What a Web Page Is Made Of
When you open example.com, the page that fills your screen feels like one finished thing — a single picture with text, colors, and buttons that react when you click them. It isn't one thing. It's three different kinds of file arriving together, each doing a separate job.
Those three jobs are structure, style, and behavior — handled by three technologies called HTML, CSS, and JavaScript. You won't write any of them in this course. The goal is narrower and more useful for now: to recognize what each one is responsible for, so that when you hear these names later they already mean something.
HTML: the Structure
HTML — short for HyperText Markup Language — is the part that lays out what's actually on the page: a heading here, a paragraph there, an image, a link, a button. It defines the content and the order it appears in, and nothing about how it looks beyond that raw order.
A page built from HTML alone would still work. It would show all the text and images in plain black-on-white, stacked top to bottom — readable, but bare. That bareness is the point: HTML is the skeleton everything else hangs on. When the server sends back a page, as the last topic described, the HTML is the core of what it sends.
CSS: the Style
CSS — short for Cascading Style Sheets — is the part that decides how the page looks. It sets the colors, the fonts, the spacing between things, and where each piece sits on the screen. The same HTML can be made to look like a newspaper or a neon poster purely by swapping its CSS.
The key thing to hold onto is that CSS changes appearance, never content. It can make a heading huge and purple, but it can't add a sentence the HTML didn't already contain. Structure and style are kept apart on purpose, so the look can change without touching what the page says.
JavaScript: the Behavior
JavaScript is the part that makes a page do things. When you click a button and a menu slides open, type into a search box and see suggestions appear, or watch a counter tick up without the page reloading — that's JavaScript running. It's code, in the sense you met earlier in this course: instructions the browser carries out.
Without JavaScript, a page can still show content (from HTML) and look polished (from CSS), but it would mostly just sit there. JavaScript is what lets it respond to you. One quick warning about the name: JavaScript and Java are two completely different languages that happen to share four letters. Treat them as unrelated.
The Browser Puts It All Together
None of these three is the page on its own. Your browser receives the HTML, the CSS, and the JavaScript — often as separate files — and assembles them into the single thing you see. It reads the structure, paints on the styling, and runs the behavior, all in a fraction of a second.
Think of building a house. The HTML is the frame and the rooms — the walls, the doorways, where each space goes. The CSS is the paint and the décor — the colors, the finishes, how it all looks once you walk in. The JavaScript is the working lights and doors — the parts that actually move and respond when you flip a switch. The browser is the builder that takes all three and hands you a finished house to live in.
- "A web page is one single file." A typical page is many files working together — at least HTML, usually CSS and JavaScript too, plus every image on it.
- "Styling and content are the same thing." Content lives in the HTML; styling lives in the CSS. The same content can be made to look completely different by changing only the CSS.
- "JavaScript and Java are the same language." They aren't related. The shared name is a historical accident; they're built differently and used for different things.
- "The browser just downloads a picture of the page." The browser receives the raw HTML, CSS, and JavaScript and builds the page itself — which is why text can be selected and buttons can react.
- "HTML, CSS, JavaScript" are the three words behind every web and front-end course you'll ever see — this is where they stop being a blur.
- It explains the term "front end," coming up in the next chapter: it's mostly these three running in your browser.
- Knowing that structure and style are separate is why a website can be redesigned overnight without rewriting a word of its content.
- Recognizing JavaScript as the interactive part demystifies why some pages feel alive and others feel like flat documents.
Knowledge Check
Which of the three handles the colors, fonts, and spacing of a page?
- HTML, which sets the look as well as listing the content of the page
- CSS, the styling part of the page
- JavaScript, which paints the colors and fonts onto the screen
- The browser, which decides the colors entirely on its own
You click a button and a menu slides open without the page reloading. Which part is at work?
- HTML, since it responds to every click you make
- CSS, which controls how the page reacts to you
- JavaScript, the behavior part
- Java, the language that runs inside every web page
Roughly what does the browser do when a page arrives?
- It takes the HTML, CSS, and JavaScript and assembles them into one page
- It receives one finished image of the whole page and simply shows it on screen
- It writes all of the colors and styling itself and ignores the files it received
- It downloads only a single file and quietly discards the rest as duplicates
You got correct