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 of these is an opening tag? (a) <h1> (b) </body> (c) </b> (d) </title>
-
2.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Orange</li>
<li>Litchi</li>
<li>Banana</li>
<li>Grapes</li>
</ul> - 3.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
-
4.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="50"> (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png - 5.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 6.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <body> (b) <head>
- 7.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
- 8.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h5>? (a) <h3> (b) <h4> (c) <h1> (d) <h5>
- 9.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
- 10.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 11.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </head> (b) </body>
-
12.📋 What number does the browser show next to “Litchi”?
<ol start="3">
<li>Guava</li>
<li>Mango</li>
<li>Litchi</li>
</ol> - 13.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
-
14.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>I love mangoes.</p>
<p>The red kite</p>
<p>Fun facts</p> -
15.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Rain today</p>
<p>Rain today</p> - 16.True or false: <img> has a closing tag. (a) True (b) False
-
17.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.
<h1>My pets</h1>
<strong>Good morning!</strong> (a) </h1> (b) </h2> (c) </i> (d) </strong> - 18.Which of these is true of a web browser? (a) sends pages over the net (b) shows line numbers (c) stores a website’s files (d) opens web pages for us
-
19.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) My Hobbies (b) body (c) Welcome! (d) I like to read. - 20.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
- 21.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
- 22.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
23.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Rain today</p> --> (a) My best friend (b) My pets (c) Rain today -
24.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Hello, world!</p>
<h2>My pets</h2>
<h2>Good morning!</h2>
<h2>Rain today</h2>
<p>My best friend</p> - 25.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
-
26.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>Cricket is fun.</h2>
<p>Good morning!</p>
<h3>The red kite</h3> - 27.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h5> or <h4>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
- 28.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
- 29.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>
- 30.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <img> (d) <meta charset="utf-8">
- 31.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
32.🔍 Which line is missing its closing tag?
line 1: <h3>Our school trip</h3>
line 2: <p>I love mangoes.
line 3: <small>Fun facts</small> (a) line 3 (b) line 1 (c) line 2 - 33.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
- 34.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
- 35.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 36.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
- 37.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 38.Which of these goes in the head? (a) <h1> (b) <img> (c) <title> (d) <table>
- 39.Which of these is an opening tag? (a) </body> (b) </b> (c) </li> (d) <body>
-
40.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Guava</li>
<li>Grapes</li>
</ul>
Answer key
- <h1>
- 5
- <!--
- map.png
- an opening tag
- <head>
- in the body
- <h5>
- 1
- a closing tag
- </head>
- 5
- <ol>
- 4
- 3
- False
- </h2>
- opens web pages for us
- Welcome!
- element
- <img>
- in the head
- Rain today
- 3
- Yes
- 3
- <h1>
- <li>
- <h1>
- <img>
- a closing tag
- line 2
- <ol>
- a paragraph
- <ul>
- <a>
- an opening tag
- <title>
- <body>
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids