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.📋 What number does the browser show next to “Jamun”?
<ol start="7">
<li>Mango</li>
<li>Orange</li>
<li>Jamun</li>
</ol> -
2.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Jamun</li>
<li>Banana</li>
<li>Mango</li>
<li>Grapes</li>
<li>Orange</li>
<li>Guava</li>
</ol> - 3.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h2>? (a) <h5> (b) <h2> (c) <h4> (d) <h6>
-
4.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p> (a) Good morning! (b) Hello, world! (c) I love mangoes. - 5.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) width (b) The full moon (c) dog.jpg (d) A happy dog -
7.🔍 Which line is missing its closing tag?
line 1: <em>Fun facts</em>
line 2: <i>Hello, world!
line 3: <strong>My pets</strong> (a) line 3 (b) line 2 (c) line 1 - 8.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
-
9.📋 What number does the browser show next to “Jamun”?
<ol start="8">
<li>Banana</li>
<li>Mango</li>
<li>Jamun</li>
</ol> -
10.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>My best friend</p> -->
<p>Rain today</p> (a) Rain today (b) My best friend (c) My pets - 11.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
-
12.🔍 Which line is missing its closing tag?
line 1: <small>My best friend
line 2: <em>My pets</em>
line 3: <b>Hello, world!</b> (a) line 3 (b) line 1 (c) line 2 -
13.📋 What number does the browser show next to “Papaya”?
<ol start="6">
<li>Grapes</li>
<li>Papaya</li>
<li>Orange</li>
<li>Banana</li>
<li>Jamun</li>
</ol> -
14.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<!-- <p>Our school trip</p> --> - 15.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) src (d) width
- 16.🔢 In a basic web page file, which comes first: “<html>” or “</head>”? (a) <html> (b) </head>
-
17.🔍 Which line is missing its closing tag?
line 1: <h2>The red kite
line 2: <u>My pets</u>
line 3: <em>Hello, world!</em> (a) line 3 (b) line 2 (c) line 1 - 18.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
- 19.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 20.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 21.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
-
22.🔍 Which line is missing its closing tag?
line 1: <h2>My best friend
line 2: <h1>I love mangoes.</h1>
line 3: <strong>Cricket is fun.</strong> (a) line 1 (b) line 3 (c) line 2 -
23.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Mango</li>
<li>Jamun</li>
<li>Banana</li>
<li>Guava</li>
</ol> -
24.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) dog.jpg (b) bus.jpg (c) A happy dog (d) moon.png -
25.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="50"> - 26.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
-
27.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Easy snacks (c) My Hobbies (d) Thanks for visiting. - 28.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) < (d) {
-
29.🔗 Which address opens when you click this link?
<a href="quiz.html">Contact us</a> (a) Contact us (b) about.html (c) quiz.html (d) games.html - 30.Which of these is an opening tag? (a) </p> (b) </body> (c) </li> (d) <body>
-
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="200"> (a) width (b) A tiger asleep (c) An old fort (d) fort.jpg -
32.📋 What number does the browser show next to “Mango”?
<ol>
<li>Orange</li>
<li>Mango</li>
<li>Banana</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Guava</li>
</ol> - 33.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
- 34.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 35.True or false: <title> goes in the body. (a) True (b) False
- 36.Which of these is an opening tag? (a) <li> (b) </b> (c) </h1> (d) </title>
- 37.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
-
38.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets - 39.True or false: <title> goes in the head. (a) False (b) True
-
40.🔗 Where does this link open?
<a href="news.html">Maths fun</a> (a) in the same tab (b) in a new tab
Answer key
- 9
- 4
- <h2>
- I love mangoes.
- <!--
- A happy dog
- line 2
- in the body
- 10
- My best friend
- <ol>
- line 1
- 7
- 2
- height
- <html>
- line 1
- <ol>
- an opening tag
- True
- href
- line 1
- 2
- dog.jpg
- 50
- <ol>
- My Hobbies
- <
- quiz.html
- <body>
- An old fort
- 2
- an attribute
- an opening tag
- False
- <li>
- to describe the image
- numbers
- True
- in the same tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids