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.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
2.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h3>My pets</h3>
<h3>Good morning!</h3> -
3.🔍 Which line is missing its closing tag?
line 1: <h3>Good morning!
line 2: <u>I love mangoes.</u>
line 3: <h2>Rain today</h2> (a) line 2 (b) line 3 (c) line 1 - 4.Which of these has a closing tag? (a) <img> (b) <input> (c) <br> (d) <h1>
- 5.Which of these is an opening tag? (a) </b> (b) </li> (c) <p> (d) </p>
- 6.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
- 7.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
- 8.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
- 9.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
- 10.True or false: <ul> lists things in any order. (a) True (b) False
- 11.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h5>? (a) <h1> (b) <h2> (c) <h5> (d) <h4>
- 12.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) src (c) height (d) width
- 13.True or false: <input> is an empty tag. (a) True (b) False
-
14.🔗 Where does this link open?
<a href="quiz.html">Visit the site</a> (a) in a new tab (b) in the same tab -
15.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>My best friend</h2>
<h3>Our school trip</h3> - 16.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to describe the image (d) to make it bigger
- 17.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) height (d) alt
- 18.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 19.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
20.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<p>Rain today</p>
<p>Our school trip</p>
<p>My best friend</p> - 21.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
- 22.Which of these has a closing tag? (a) <input> (b) <meta> (c) <title> (d) <br>
- 23.True or false: a web server shows pages from the web. (a) True (b) False
-
24.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Banana</li>
<li>Guava</li>
<li>Papaya</li>
</ul> - 25.True or false: <ol> is an ordered list. (a) False (b) True
-
26.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) My Hobbies (b) I like to read. (c) index.html (d) All about me - 27.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 28.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
- 29.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
- 30.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 31.True or false: in <img>, src sets how tall it is. (a) False (b) True
-
32.🔗 Which address opens when you click this link?
<a href="news.html">Art corner</a> (a) Art corner (b) quiz.html (c) news.html (d) games.html -
33.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h2>The red kite</h2>
<h3>Fun facts</h3>
<h3>Fun facts</h3> -
34.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Fun facts</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>Rain today</p> -->
<p>Hello, world!</p> - 35.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
36.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Banana</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers -
37.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p> (a) Fun facts (b) My pets (c) Our school trip (d) Cricket is fun. - 38.True or false: in <img>, alt names the picture file. (a) True (b) False
-
39.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Cricket is fun.</p>
<p>My pets</p> - 40.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
Answer key
- has a closing tag
- 3
- line 1
- <h1>
- <p>
- False
- <!--
- <h6>
- href
- True
- <h1>
- height
- True
- in the same tab
- 3
- to describe the image
- src
- an empty tag
- an opening tag
- 4
- True
- <title>
- False
- 4
- True
- My Hobbies
- No
- 6
- a paragraph
- an opening tag
- False
- news.html
- 4
- 2
- has a closing tag
- numbers
- Our school trip
- False
- 1
- <!DOCTYPE html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids