Web developers usually talk about three languages that are used to create web pages: HTML, CSS, and JavaScript. | Where possible, aim to keep the three languages in separate files with the HTML page linking to CSS and JavaScript files |
---|---|
Each language forms a separate layer with a different purpose. Each layer, from left to right. builds on the previous one |
Layer Type | files |
---|---|
CONTENT LAYER | html files This is where the content of the page lives. The HTML gives the page structure and adds semantics. |
PRESENTATION LAYER | css files The CSS enhances the HTML page with rules that state how the HTML content is presented (backgrounds, borders, box dimensions, colors, fonts, etc.) |
BEHAVIOR layer | .js files This is where we can change how the page behaves, adding interactivity. We will aim to keep as much of our JavaScript as possible in separate files. |