HTML Worksheet: Practice Test
Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.
NameDateTime takenScore ___ / 40
-
1.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Rivers flow</p> - 2.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h5>? (a) <h1> (b) <h6> (c) <h5> (d) <h3>
- 3.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
- 4.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
-
5.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Rain today</p>
<p>Cricket is fun.</p> - 6.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
-
7.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red<br>Sky is blue<br>Birds sing</p> - 8.True or false: a web browser colours code to help us. (a) True (b) False
-
9.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Rain today</p>
<h2>My pets</h2>
<p>Fun facts</p>
<h2>My best friend</h2>
<p>Good morning!</p> - 10.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h3>? (a) <h6> (b) <h4> (c) <h3> (d) <h1>
-
11.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Good morning!</p> -->
<p>Rain today</p> (a) Rain today (b) The red kite (c) Good morning! - 12.Which of these has a closing tag? (a) <h1> (b) <br> (c) <img> (d) <meta>
- 13.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
- 14.True or false: <input> is an empty tag. (a) True (b) False
- 15.🏷️ Which is the closing tag for <i>? (a) <i> (b) </i> (c) <i/> (d) <\i>
-
16.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Good morning!</h2>
<h2>My best friend</h2>
<p>Rain today</p>
<h2>My best friend</h2> - 17.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
-
18.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>My pets</p> -->
<p>Good morning!</p>
<!-- <p>The red kite</p> -->
<p>Fun facts</p> - 19.Which of these is true of a web browser? (a) colours code to help us (b) answers page requests (c) shows pages from the web (d) stores a website’s files
- 20.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
21.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My best friend</p>
<!-- <p>Fun facts</p> --> (a) My best friend (b) Fun facts (c) Our school trip - 22.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
-
23.🔗 Which words do you click on?
<a href="about.html">Art corner</a> (a) href (b) about.html (c) School news (d) Art corner -
24.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.
<h3>Good morning!</h3>
<small>Fun facts</small> (a) </small> (b) </i> (c) </h3> (d) </h2> -
25.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Rain today</p>
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p> (a) Fun facts (b) Hello, world! (c) The red kite (d) Rain today - 26.True or false: HTML on its own can make a form. (a) True (b) False
-
27.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p> (a) Hello, world! (b) I love mangoes. (c) My pets (d) Our school trip -
28.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Hello, world!</p> -->
<p>Rain today</p> -
29.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Our school trip</p>
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p> (a) Fun facts (b) Cricket is fun. (c) Our school trip (d) My best friend - 30.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to show pictures (d) to add colour
- 31.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
-
32.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Our school trip</p> --> -
33.🔍 One closing tag is missing. Which one?
<p>My best friend
<u>Hello, world!</u>
<h1>My pets</h1> (a) </u> (b) </h1> (c) </p> (d) </em> -
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) dog.jpg (b) width (c) A happy dog (d) The full moon - 35.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h1> or <h5>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>
-
36.🔗 Where does this link open?
<a href="contact.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab - 37.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) an attribute (d) a comment
- 38.🔢 In a basic web page file, which comes first: “</html>” or “<body>”? (a) </html> (b) <body>
- 39.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
-
40.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>I love mangoes.</p>
<h2>Our school trip</h2>
<h2>My pets</h2>
<p>I love mangoes.</p>
Answer key
- 3
- <h1>
- a web server
- on the browser tab
- 1
- <a href="about.html">
- 4
- False
- 4
- <h6>
- Good morning!
- <h1>
- <li>
- True
- </i>
- 2
- href
- 2
- shows pages from the web
- in the body
- Fun facts
- opens it in a new tab
- Art corner
- </h2>
- Hello, world!
- True
- Our school trip
- 1
- Fun facts
- to leave notes
- <a>
- 1
- </p>
- A happy dog
- <h1>
- in a new tab
- an attribute
- <body>
- True
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids