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 heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h2>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
- 2.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
- 3.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
- 4.Which of these goes in the body? (a) <h1> (b) <title> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
-
5.🔍 One closing tag is missing. Which one?
<h3>Our school trip</h3>
<em>My best friend
<strong>I love mangoes.</strong> (a) </strong> (b) </em> (c) </h3> (d) </u> -
6.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets - 7.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
8.🔗 Which address opens when you click this link?
<a href="news.html">About us</a> (a) About us (b) quiz.html (c) games.html (d) news.html - 9.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) alt (d) height
-
10.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>My best friend</h2>
<p>My best friend</p>
<p>I love mangoes.</p>
<h2>Rain today</h2> - 11.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) <body>
-
12.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) Art corner (b) href (c) Maths fun (d) art.html - 13.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h5> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
-
14.🔍 Which line is missing its closing tag?
line 1: <p>Good morning!</p>
line 2: <small>My best friend
line 3: <h1>Fun facts</h1> (a) line 1 (b) line 2 (c) line 3 - 15.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
-
16.🔍 One closing tag is missing. Which one?
<h3>Hello, world!
<em>Rain today</em>
<p>I love mangoes.</p> (a) </em> (b) </p> (c) </h1> (d) </h3> - 17.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 18.Which of these is true of a web browser? (a) saves our .html files (b) shows pages from the web (c) shows line numbers (d) is where we type code
- 19.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h3>? (a) <h6> (b) <h3> (c) <h2> (d) <h5>
-
20.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Jamun</li>
</ol> - 21.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 22.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
- 23.True or false: <li> is one item of a list. (a) False (b) True
- 24.True or false: in <img>, width tells which image to load. (a) False (b) True
- 25.📄 Can HTML on its own make a form? (a) No (b) Yes
-
26.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Good morning!</p> --> - 27.Which of these goes in the head? (a) <h1> (b) <table> (c) <link rel="stylesheet"> (d) <p>
- 28.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
-
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite -
30.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="50"> -
31.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) A red kite (b) kite.png (c) cake.jpg (d) map.png - 32.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
- 33.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
- 34.Which of these is an empty tag? (a) <h1> (b) <p> (c) <b> (d) <br>
-
35.🔗 Where does this link open?
<a href="art.html">Take the quiz</a> (a) in a new tab (b) in the same tab - 36.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
37.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Good morning!</p>
<h2>Good morning!</h2> - 38.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
-
39.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) href (b) Visit the site (c) Contact us (d) games.html - 40.💬 Does the browser show comments on the page? (a) Yes (b) No
Answer key
- <h5>
- a line across the page
- href
- <h1>
- </em>
- numbers
- a closing tag
- news.html
- width
- 3
- <!DOCTYPE html>
- Maths fun
- <h6>
- line 2
- element
- </h3>
- True
- shows pages from the web
- <h6>
- 2
- Yes
- a code editor
- True
- False
- Yes
- 1
- <link rel="stylesheet">
- <ul>
- A tiger asleep
- 50
- kite.png
- No
- a web server
- <br>
- in the same tab
- in the body
- 2
- <h5>
- Contact us
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids