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.True or false: <ol> lists things in any order. (a) False (b) True
-
2.🔍 One closing tag is missing. Which one?
<i>The red kite</i>
<u>My pets</u>
<strong>Hello, world! (a) </strong> (b) </i> (c) </u> (d) </p> - 3.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h1>? (a) <h1> (b) <h5> (c) <h2> (d) <h3>
- 4.🔢 In a basic web page file, which comes first: “<body>” or “</html>”? (a) </html> (b) <body>
- 5.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
- 6.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
7.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Rain today</p>
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<!-- <p>Fun facts</p> --> -
8.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>The red kite</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>Our school trip</p> --> -
9.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="300"> -
10.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab - 11.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
- 12.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
-
13.📋 What number does the browser show next to “Orange”?
<ol>
<li>Jamun</li>
<li>Orange</li>
<li>Papaya</li>
<li>Mango</li>
<li>Grapes</li>
</ol> - 14.True or false: HTML on its own can count button clicks. (a) True (b) False
-
15.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Banana</li>
<li>Grapes</li>
</ul> (a) numbers (b) bullets -
16.📋 What number does the browser show next to “Papaya”?
<ol start="3">
<li>Orange</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Mango</li>
</ol> -
17.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Rain today</p> -->
<p>The red kite</p>
<p>Fun facts</p> (a) Rain today (b) The red kite (c) My best friend (d) Fun facts - 18.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h2> or <h1>? (a) <h6> (b) <h1> (c) <h5> (d) <h2>
-
19.🔗 Which words do you click on?
<a href="news.html">Art corner</a> (a) School news (b) href (c) news.html (d) Art corner -
20.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Our school trip</p>
<p>Cricket is fun.</p>
<h2>I love mangoes.</h2>
<p>Fun facts</p>
<p>Fun facts</p> -
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>My drawings</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) My drawings (b) Art Gallery (c) index.html (d) We won by 5 runs. - 22.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 23.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h6> or <h1>? (a) <h3> (b) <h6> (c) <h1> (d) <h5>
- 24.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
- 25.True or false: a web browser sends pages over the net. (a) False (b) True
- 26.💬 How does an HTML comment end? (a) --> (b) >> (c) */ (d) //
- 27.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
- 28.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <\p> (c) <p> (d) </p>
- 29.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h4>? (a) <h2> (b) <h5> (c) <h4> (d) <h3>
- 30.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
- 31.True or false: in <img>, alt sets how tall it is. (a) False (b) True
- 32.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
33.🔗 Where does this link open?
<a href="news.html">Contact us</a> (a) in a new tab (b) in the same tab - 34.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the body (d) the title
-
35.🔗 Which address opens when you click this link?
<a href="maths.html">About us</a> (a) maths.html (b) About us (c) art.html (d) news.html -
36.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Fun facts</p>
<h4>My pets</h4>
<p>My best friend</p>
<p>Hello, world!</p> - 37.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) ( (d) [
- 38.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h2>? (a) <h1> (b) <h5> (c) <h4> (d) <h2>
-
39.🔗 Where does this link open?
<a href="games.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 40.Which of these goes in the head? (a) <table> (b) <link rel="stylesheet"> (c) <ul> (d) <h1>
Answer key
- False
- </strong>
- <h5>
- <body>
- a web browser
- a closing tag
- 3
- 3
- 300
- in a new tab
- 6
- 1
- 2
- False
- bullets
- 6
- Rain today
- <h6>
- Art corner
- 5
- Art Gallery
- No
- <h6>
- <ul>
- False
- -->
- <ul>
- </p>
- <h2>
- <!--
- False
- in the head
- in the same tab
- the body
- maths.html
- 2
- <
- <h1>
- in a new tab
- <link rel="stylesheet">
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids