HTML, CSS and JavaScript
A web page is built from three layers: HTML for structure and meaning, CSS for presentation, and JavaScript for behaviour.
Assign structure, presentation and behavior to the appropriate layer of a page.
Frontend development is building the part of a website that runs in the visitor's browser. Every frontend, from a one-page portfolio to a huge web app, rests on the same three languages. Knowing which one owns which job saves you from fighting the wrong tool.
The rule
HTML is the noun, CSS the adjective, JavaScript the verb.
- HTML says what things are: a heading, a list, a button, an image. It gives the page structure and meaning.
- CSS (Cascading Style Sheets) says what things look like: colours, fonts, spacing, layout.
- JavaScript says what things do: respond to a click, fetch new data, update the page without reloading.
Here is one button seen through all three layers:
<button id="like">Like</button>#like { background: crimson; color: white; }document.querySelector("#like").addEventListener("click", () => {
alert("Thanks!");
});The HTML alone gives a working, plain button. CSS paints it. JavaScript makes clicking it do something. Remove the CSS and JavaScript and the button still exists and still means "button". Remove the HTML and the other two have nothing to act on.
That is why HTML comes first. It is the foundation, and a page with good HTML stays usable even if styles fail to load or scripts are blocked.