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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) Birthday cake (b) A happy dog (c) width (d) cake.jpg -
2.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.
<em>The red kite</em>
<u>I love mangoes.</u> (a) </em> (b) </h2> (c) </u> (d) </i> - 3.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
- 4.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
-
5.🔍 Which line is missing its closing tag?
line 1: <b>My best friend</b>
line 2: <small>The red kite</small>
line 3: <h3>Good morning! (a) line 1 (b) line 3 (c) line 2 -
6.🔗 Which address opens when you click this link?
<a href="art.html">Play games</a> (a) Play games (b) art.html (c) quiz.html (d) news.html -
7.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) bus.jpg (b) dog.jpg (c) moon.png (d) A happy dog - 8.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
- 9.Which of these is an empty tag? (a) <ul> (b) <h1> (c) <p> (d) <hr>
-
10.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="150"> - 11.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
-
12.🔍 Which line is missing its closing tag?
line 1: <h3>Hello, world!
line 2: <b>The red kite</b>
line 3: <h2>Good morning!</h2> (a) line 1 (b) line 2 (c) line 3 -
13.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>Rain today</h2>
<p>Rain today</p>
<p>Fun facts</p> - 14.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) </h2> (d) <h2/>
- 15.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h4> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
- 16.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <hr> (d) <ol>
- 17.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
- 18.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
- 19.True or false: HTML on its own can pick a random number. (a) True (b) False
-
20.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Our school trip</p>
<h3>The red kite</h3>
<h4>My pets</h4> - 21.Which of these has a closing tag? (a) <input> (b) <hr> (c) <title> (d) <br>
- 22.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </head>
- 23.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
- 24.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
- 25.True or false: <img> goes in the head. (a) False (b) True
-
26.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) bus.jpg (b) fort.jpg (c) Our school bus (d) tiger.jpg -
27.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>My pets</p>
<p>I love mangoes.</p>
<p>Good morning!</p> - 28.🔢 In a basic web page file, which comes first: “<html>” or “</head>”? (a) </head> (b) <html>
- 29.🏷️ Which is the closing tag for <p>? (a) </p> (b) <p> (c) <\p> (d) <p/>
- 30.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
- 31.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h5>
-
32.🔗 Which words do you click on?
<a href="games.html">Take the quiz</a> (a) games.html (b) href (c) Take the quiz (d) Play games - 33.True or false: a web server sends pages over the net. (a) True (b) False
- 34.Which of these has a closing tag? (a) <br> (b) <meta> (c) <h1> (d) <input>
- 35.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
- 36.🏷️ Which is the closing tag for <b>? (a) </b> (b) <\b> (c) <b> (d) <b/>
- 37.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h3>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
- 38.True or false: a code editor opens web pages for us. (a) False (b) True
-
39.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Orange</li>
<li>Litchi</li>
</ol> -
40.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>My best friend</p>
<p>Rain today</p>
Answer key
- Birthday cake
- </h2>
- <h6>
- <img>
- line 3
- art.html
- dog.jpg
- src
- <hr>
- 150
- a slash /
- line 1
- 3
- </h2>
- <h6>
- <ul>
- <h4>
- element
- False
- 3
- <title>
- <!DOCTYPE html>
- <ol>
- href
- False
- bus.jpg
- 5
- <html>
- </p>
- <li>
- <h5>
- Take the quiz
- True
- <h1>
- <!DOCTYPE html>
- </b>
- <h1>
- False
- 3
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids