New Tenchi

Plain-English guides to how the web and software development actually work

What's the difference between HTML, CSS, and JavaScript?

Every web page you have ever visited is built from some combination of three languages, and they have a strict division of labor.

HTML: what the page IS

HTML (HyperText Markup Language) describes the structure and meaning of content. A heading, a paragraph, a list, a link, an image — each is an HTML element. HTML says nothing about appearance; it says what things are. The exact behavior of every element is defined in the WHATWG HTML Living Standard, which is the continuously updated specification that browser makers implement. When two browsers show the same HTML the same way, it's because both follow that document.

A useful mental test: if you stripped away all styling and scripts, would the content still make sense read top to bottom? Good HTML passes that test, which is also why screen readers and search engines depend on it.

CSS: what the page LOOKS LIKE

CSS (Cascading Style Sheets) controls presentation — colors, fonts, spacing, layout, and how all of that adapts to different screen sizes. CSS rules "select" HTML elements and apply visual properties to them. The separation matters: the same HTML document can look completely different under different stylesheets, and you can redesign a site without touching its content.

JavaScript: what the page DOES

JavaScript is a full programming language that runs inside the browser. It responds to events — clicks, typing, scrolling — and can change the page after it loads: validating a form, fetching new data without a reload, opening a menu. Formally, the language is standardized as ECMAScript by Ecma International under ECMA-262; "JavaScript" is the everyday name for implementations of that standard. (There's more on that naming history in What is ECMAScript?.)

Why three languages instead of one?

Because the concerns really are different. Content changes on a different schedule than design, and design changes on a different schedule than behavior. Keeping them in separate layers means a writer can edit text without breaking layout, and a designer can restyle without breaking logic. The web's history rewarded this separation, and every serious framework still respects it underneath.

Which should you learn first?

In order: HTML, then CSS, then JavaScript. HTML can be learned in days and everything else builds on it. CSS takes longer to get good at but is immediately useful. JavaScript is genuine programming and rewards patience. For all three, the reference most working developers keep open is MDN Web Docs, Mozilla's documentation of HTML, CSS, JavaScript, and the browser APIs — it pairs specifications with practical examples, which makes it far friendlier than reading standards directly.

Once you can build a static page with the first two, you know enough to think about whether you need a CMS and how browsers turn your code into pixels.

Sources