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 tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
-
2.🔍 Which line is missing its closing tag?
line 1: <i>Cricket is fun.</i>
line 2: <h2>I love mangoes.</h2>
line 3: <b>Fun facts (a) line 3 (b) line 1 (c) line 2 - 3.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) <head> (b) </body>
- 4.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
5.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>I love mangoes.</h3>
<h2>Good morning!</h2>
<h4>My pets</h4> - 6.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
- 7.Which of these goes in the head? (a) <p> (b) <a> (c) <meta charset="utf-8"> (d) <ul>
-
8.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Maths fun</a> (a) in the same tab (b) in a new tab - 9.Which of these is an opening tag? (a) </li> (b) <h1> (c) </p> (d) </title>
-
10.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Litchi</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers - 11.True or false: a web browser has an address bar. (a) False (b) True
- 12.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
- 13.Which of these is an opening tag? (a) </title> (b) <b> (c) </body> (d) </h1>
- 14.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 15.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h2>? (a) <h2> (b) <h6> (c) <h3> (d) <h5>
- 16.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
17.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Grapes</li>
<li>Guava</li>
<li>Banana</li>
<li>Orange</li>
</ul> - 18.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
-
19.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<!-- <p>Our school trip</p> --> -
20.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="400"> - 21.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
- 22.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
- 23.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h6>? (a) <h3> (b) <h5> (c) <h6> (d) <h4>
- 24.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
25.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Banana</li>
<li>Mango</li>
<li>Guava</li>
<li>Orange</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> - 26.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 27.📝 What does <hr> draw? (a) a picture (b) a table (c) a link (d) a line across the page
- 28.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
- 29.True or false: a web browser is where we type code. (a) True (b) False
- 30.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
- 31.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) stores a website’s files (d) has an address bar
- 32.True or false: <br> is an empty tag. (a) False (b) True
- 33.Which of these goes in the head? (a) <img> (b) <h1> (c) <title> (d) <p>
- 34.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
-
35.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>I love mangoes.</h2>
<p>Cricket is fun.</p>
<p>My pets</p>
<p>My best friend</p> - 36.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </html> (c) </head> (d) <body>
- 37.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the doctype (d) the head
- 38.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
-
39.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="400"> (a) A red kite (b) map.png (c) cake.jpg (d) kite.png -
40.🔗 Where does this link open?
<a href="contact.html">Take the quiz</a> (a) in the same tab (b) in a new tab
Answer key
- <h6>
- line 3
- <head>
- a closing tag
- 4
- a web server
- <meta charset="utf-8">
- in a new tab
- <h1>
- numbers
- True
- <a href="about.html">
- <b>
- in the body
- <h2>
- in the body
- 5
- No
- 1
- 400
- 6
- True
- <h3>
- Yes
- 5
- Yes
- a line across the page
- </h2>
- False
- <!--
- stores a website’s files
- True
- <title>
- alt
- 2
- </html>
- the body
- <ul>
- kite.png
- in the same tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids