Structure, Presentation, Behaviour
What this is. Every web page you have ever used is built from at most three languages, and each one has exactly one job.
HTML describes what the content means: this is a heading, this is a paragraph, this is navigation.
CSS describes how it should look: colour, spacing, typography, layout.
JavaScript describes what it does: reacting to a click, validating a form, fetching data.
✦ Why this separation exists
It would be technically possible to mix all three together. We separate them because a page whose meaning is independent of its appearance can be restyled without being rewritten, read aloud by a screen reader, understood by a search engine, and printed sensibly. Separation is not tidiness for its own sake, it is what makes a page usable in situations you did not anticipate.
Where this fits. A page can be genuinely useful with HTML alone. Add CSS and it becomes pleasant. Add JavaScript and it becomes interactive. That order matters: it is the order in which the web degrades gracefully when something fails.
Mark this lesson complete
Your progress is saved on this device. No account needed.