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="moon.png" alt="The full moon" width="100"> (a) moon.png (b) Our school bus (c) width (d) The full moon - 2.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
- 3.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
-
4.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Rain today</p>
<p>My pets</p>
<p>The red kite</p>
<p>Cricket is fun.</p> - 5.🔤 In “HTML”, what does the L stand for? (a) Line (b) Laptop (c) Language (d) Link
-
6.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> - 7.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
-
8.🔍 One closing tag is missing. Which one?
<h2>My pets</h2>
<h3>Our school trip
<b>The red kite</b> (a) </h3> (b) </b> (c) </strong> (d) </h2> - 9.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) height (d) src
-
10.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>Cricket is fun.</h2>
<p>My pets</p>
<p>Fun facts</p> - 11.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
12.🔗 Where does this link open?
<a href="contact.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab - 13.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 14.📄 Can HTML on its own make headings? (a) No (b) Yes
- 15.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 16.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h1>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
- 17.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
-
18.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> -
19.🔗 Which address opens when you click this link?
<a href="games.html">Play games</a> (a) Play games (b) about.html (c) contact.html (d) games.html - 20.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h2>? (a) <h4> (b) <h3> (c) <h1> (d) <h2>
- 21.Which of these is true of a code editor? (a) colours code to help us (b) has an address bar (c) sends pages over the net (d) answers page requests
-
22.🔍 Which line is missing its closing tag?
line 1: <h3>Fun facts</h3>
line 2: <em>Good morning!</em>
line 3: <small>My best friend (a) line 2 (b) line 3 (c) line 1 - 23.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
- 24.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
- 25.Which of these is an opening tag? (a) <h1> (b) </p> (c) </body> (d) </title>
- 26.True or false: <a> goes in the body. (a) True (b) False
- 27.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
- 28.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
-
29.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p>
<p>My pets</p>
<!-- <p>My best friend</p> --> - 30.Which of these has a closing tag? (a) <img> (b) <meta> (c) <p> (d) <br>
-
31.🔗 Which words do you click on?
<a href="news.html">Maths fun</a> (a) Maths fun (b) href (c) Art corner (d) news.html - 32.True or false: <li> lists things in any order. (a) True (b) False
- 33.Which of these is a closing tag? (a) </h1> (b) <li> (c) <h1> (d) <title>
- 34.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 35.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
- 36.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
-
37.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers -
38.🔍 Which line is missing its closing tag?
line 1: <h2>Rain today
line 2: <u>Cricket is fun.</u>
line 3: <em>Hello, world!</em> (a) line 1 (b) line 3 (c) line 2 - 39.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h4>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
-
40.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Fun facts</p>
<p>Good morning!</p> (a) Fun facts (b) Good morning! (c) My pets
Answer key
- The full moon
- 6
- <li>
- 1
- Language
- 100
- element
- </h3>
- width
- 3
- an empty tag
- in a new tab
- <ul>
- Yes
- has a closing tag
- <h1>
- <ol>
- 400
- games.html
- <h4>
- colours code to help us
- line 3
- <a href="about.html">
- <img>
- <h1>
- True
- to leave notes
- False
- 2
- <p>
- Maths fun
- False
- </h1>
- in the head
- -->
- a web server
- numbers
- line 1
- <h2>
- My pets
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids