How a browser renders a web page, online
Six activities your students do on their own devices. See who's finished, and their scores.
How a browser renders a web page in one minute
What students need to know
The html element is the root the browser renders everything else inside of. Before rendering, the browser sends a request like this to the server for the file.
The browser reads the HTML and paints it as the page you see. Reading the markup and painting the page is exactly what rendering means.
Mistakes students make
- The declaration is missing its exclamation mark; it must be <!DOCTYPE html> so the browser renders the page in standards mode.
- The opening html tag is missing its closing angle bracket; it should be <html> so the browser recognises the root element.
- The opening tag is misspelled as <boddy>; the browser only renders a body region from a correctly spelled <body>.
- The heading's closing tag is missing its slash; it should be </h1> so the browser knows where the heading ends.
What students will learn in this module
Every question in Module 1
Quick questions
- What does a browser do with an HTML file it receives?ARenders it into a visible pageBCompiles it into machine code
- Where does a browser usually get a web page's files from?AThe screen itselfBA web server
- True or false: the browser reads HTML and paints it on screen.ATrueBFalse
- Which is the visible result of rendering?AA formatted page with headings and textBThe raw HTML shown as plain code
- Does the content inside <body> appear in the rendered page?ANo, it is always hiddenBYes, it is the visible content
Key terms
Students type the meaning of:
rendering
Match the pairs
<!DOCTYPE html>Match it to what it does<body>...</body>Match it to what it doesThe element that wraps the whole page the browser rendersMatch it to what it doesThe request a browser sends to fetch a page's filesMatch it to what it does<boddy></boddy>Match it to what it does<h1>Hi</h2>Match it to what it doesFill in the blanks
<___></html>
Hint: Type the root element name that wraps the whole page the browser renders.
<___></body>
Hint: Type the element that holds the visible content the browser paints.
<!DOCTYPE ___>
Hint: Type the document type this declaration tells the browser to render.
<___>Hello</h1>
Hint: Type the top-level heading tag the browser renders as large text.
<body> </___>
Hint: Type the element name in the closing tag that matches the opening body tag.
Spot the error
Question 1
A<DOCTYPE html>B<html>C<body></body>D</html>
Question 2
A<!DOCTYPE html>B<htmlC<body></body>D</html>
Question 3
A<!DOCTYPE html>B<html>C<boddy>D</body>E</html>
Question 4
A<!DOCTYPE html>B<html>C<body>D<h1>Hi<h1>E</body>F</html>
Question 5
A<!DOCTYPE html>B<html>C<body>D<p>Text</p>E<html>
