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: <b>The red kite
line 2: <u>Rain today</u>
line 3: <p>Hello, world!</p> (a) line 2 (b) line 1 (c) line 3 -
2.🔗 Which words do you click on?
<a href="maths.html">Visit the site</a> (a) Maths fun (b) Visit the site (c) href (d) maths.html - 3.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
-
4.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) All about me (b) Cricket Club (c) index.html (d) Thanks for visiting. -
5.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<p>My pets</p>
<p>Fun facts</p>
<h2>Good morning!</h2> - 6.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) </head> (c) <html> (d) <!DOCTYPE html>
- 7.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 8.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
- 9.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Mouse (d) Modern
- 10.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
-
11.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>My pets</p>
<h2>I love mangoes.</h2>
<h2>Good morning!</h2> - 12.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
- 13.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
14.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) Visit the site (b) href (c) contact.html (d) Maths fun -
15.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) dog.jpg (b) bus.jpg (c) moon.png (d) A happy dog -
16.🔍 One closing tag is missing. Which one?
<h3>My pets</h3>
<h1>Cricket is fun.</h1>
<p>Our school trip (a) </em> (b) </h3> (c) </p> (d) </h1> - 17.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
- 18.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <pic> (d) <img>
- 19.💬 How does an HTML comment end? (a) --> (b) >> (c) */ (d) //
- 20.Which of these is an opening tag? (a) </p> (b) </title> (c) </h1> (d) <h1>
-
21.🔗 Which words do you click on?
<a href="contact.html">Maths fun</a> (a) contact.html (b) Maths fun (c) Art corner (d) href - 22.True or false: <a> goes in the body. (a) True (b) False
-
23.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) About us (b) maths.html (c) Play games (d) href -
24.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Fun facts</h2>
<p>Fun facts</p>
<p>Our school trip</p>
<p>The red kite</p>
<p>Cricket is fun.</p> - 25.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
-
26.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Good morning!</p>
<!-- <p>My pets</p> --> -
27.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Our school trip</p>
<p>Cricket is fun.</p>
<p>My pets</p> (a) My pets (b) Good morning! (c) Our school trip (d) Cricket is fun. - 28.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
- 29.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the doctype (d) the body
- 30.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
31.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p> - 32.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h4>? (a) <h3> (b) <h2> (c) <h6> (d) <h4>
-
33.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.</h1>
<p>Our school trip</p>
<h3>The red kite (a) </h3> (b) </h1> (c) </small> (d) </p> -
34.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="50"> (a) bus.jpg (b) moon.png (c) The full moon (d) fort.jpg - 35.True or false: <title> goes in the head. (a) True (b) False
- 36.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
-
37.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets -
38.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) quiz.html (b) games.html (c) School news (d) about.html - 39.True or false: in <img>, height sets how wide it is. (a) True (b) False
-
40.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="350">
Answer key
- line 1
- Visit the site
- <ol>
- Cricket Club
- 4
- <!DOCTYPE html>
- in the head
- False
- Markup
- <!DOCTYPE html>
- 2
- <!--
- Yes
- Visit the site
- dog.jpg
- </p>
- <li>
- <img>
- -->
- <h1>
- Maths fun
- True
- Play games
- 5
- <h6>
- 2
- Good morning!
- to leave notes
- the body
- a closing tag
- 1
- <h6>
- </h3>
- moon.png
- True
- <ol>
- bullets
- quiz.html
- False
- 350
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids