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.🔍 Which line is missing its closing tag?
line 1: <i>Hello, world!</i>
line 2: <h3>Cricket is fun.
line 3: <p>Our school trip</p> (a) line 3 (b) line 2 (c) line 1 - 2.True or false: in <img>, width is read by screen readers. (a) True (b) False
-
3.🔍 One closing tag is missing. Which one?
<u>My pets</u>
<i>I love mangoes.
<small>Rain today</small> (a) </u> (b) </p> (c) </i> (d) </small> -
4.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<p>Good morning!</p> (a) Hello, world! (b) My pets (c) Good morning! -
5.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Hello, world!</p>
<h2>Hello, world!</h2>
<p>The red kite</p>
<p>I love mangoes.</p> - 6.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
- 7.Which of these is an opening tag? (a) </li> (b) </h1> (c) <li> (d) </p>
- 8.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h1>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
-
9.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) Contact us (b) href (c) About us (d) https://example.com - 10.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h5>
- 11.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </head> (c) <body> (d) <html>
- 12.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
- 13.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong/> (c) <strong> (d) </strong>
- 14.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
- 15.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 16.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
17.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="50"> - 18.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
-
19.🔗 Which words do you click on?
<a href="news.html">Play games</a> (a) Play games (b) news.html (c) About us (d) href - 20.Which of these is an empty tag? (a) <h1> (b) <li> (c) <br> (d) <title>
-
21.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) cake.jpg (b) dog.jpg (c) Birthday cake (d) moon.png -
22.🔍 One closing tag is missing. Which one?
<strong>I love mangoes.
<h3>My pets</h3>
<i>The red kite</i> (a) </i> (b) </h3> (c) </h2> (d) </strong> - 23.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
- 24.Which of these is true of a web browser? (a) saves our .html files (b) turns HTML into a page (c) hosts websites online (d) is where we type code
-
25.🔗 Where does this link open?
<a href="https://example.com">Visit the site</a> (a) in the same tab (b) in a new tab - 26.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
-
27.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) contact.html (b) href (c) About us (d) Play games -
28.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing</p> -
29.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) quiz.html (b) href (c) About us (d) Contact us -
30.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Roses are red<br>Sky is blue</p> - 31.True or false: <ol> lists steps in order. (a) True (b) False
- 32.True or false: <br> has a closing tag. (a) True (b) False
-
33.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="50"> - 34.True or false: a code editor shows pages from the web. (a) False (b) True
-
35.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>My best friend</p>
<!-- <p>Hello, world!</p> --> (a) Hello, world! (b) My pets (c) My best friend - 36.True or false: in <img>, height sets how wide it is. (a) True (b) False
-
37.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) My Hobbies (b) body (c) Welcome! (d) We won by 5 runs. - 38.True or false: in <img>, height sets how tall it is. (a) True (b) False
- 39.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
- 40.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
Answer key
- line 2
- False
- </i>
- My pets
- 4
- True
- <li>
- <h1>
- About us
- <h2>
- <!DOCTYPE html>
- 1
- </strong>
- a line across the page
- an opening tag
- in the head
- 50
- <a href="about.html">
- Play games
- <br>
- cake.jpg
- </strong>
- <li>
- turns HTML into a page
- in the same tab
- <h1>
- Play games
- 2
- About us
- 4
- True
- False
- 50
- False
- Hello, world!
- False
- Welcome!
- True
- <h1>
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids