Grades 3–5 · Computing
How does a browser turn downloaded files into a page?
A web page may look like a finished poster, but a browser often receives instructions for building it. One file can describe the words and pictures. Other files can describe how those parts should look. The browser brings the information together to make the page you see.
In the diagramA browser draws a page from instructionsThe same content can fit different page widths.HTML: content structureHeading + paragraphCSS gives style rulesBlue heading; spacingSunshineA bright new dayWideRead the structure → apply styles → lay out → paintPage width changes line breaks; the words keep their order.
HTML describes the structure. It can mark some words as a heading and others as a paragraph. CSS supplies rules for appearance, such as a blue heading, larger letters or extra space. The browser reads these rules and works out which ones apply to each part.
Next it calculates a layout: how large the visible parts are and where they fit. A narrow space may put the same paragraph onto more lines. Finally, the browser paints the letters, colors and pictures on the screen. When the window changes size, it can calculate a new arrangement while keeping the same words.
About this explanation
Starting knowledge: Recognize web pages, headings and paragraphs.
Sources
- MDN Web Docs — How browsers load websites
- MDN Web Docs — Populating the page: how browsers work