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 is the odd one out? (a) saves our .html files (b) is where we type code (c) shows line numbers (d) opens web pages for us
- 2.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h2>? (a) <h6> (b) <h2> (c) <h1> (d) <h3>
- 3.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 4.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) [ (d) {
- 5.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
- 6.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 7.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="150"> (a) An old fort (b) fort.jpg (c) A tiger asleep (d) width - 9.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to add colour (d) to show pictures
- 10.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
- 11.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 6 (d) 3
-
12.🔗 Where does this link open?
<a href="games.html">Maths fun</a> (a) in the same tab (b) in a new tab - 13.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
- 14.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
- 15.Which of these is an opening tag? (a) </li> (b) </p> (c) <p> (d) </title>
-
16.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) about.html (b) quiz.html (c) Art corner (d) games.html - 17.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </head> (c) <body> (d) <head>
- 18.Which of these is true of a web server? (a) has an address bar (b) turns HTML into a page (c) shows pages from the web (d) answers page requests
-
19.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> -
20.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.</h2>
<em>My pets
<strong>Cricket is fun.</strong> (a) </h2> (b) </em> (c) </strong> (d) </h3> -
21.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p> -
22.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="250"> -
23.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Roses are red</p> -
24.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>The red kite</p>
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p> (a) Good morning! (b) The red kite (c) Cricket is fun. (d) I love mangoes. - 25.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
- 26.🔍 Which is the odd one out? (a) is where we type code (b) has an address bar (c) opens web pages for us (d) turns HTML into a page
-
27.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Guava</li>
</ul> (a) numbers (b) bullets -
28.🔍 One closing tag is missing. Which one?
<p>The red kite
<h2>Our school trip</h2>
<b>Hello, world!</b> (a) </p> (b) </h2> (c) </b> (d) </em> -
29.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) games.html (b) contact.html (c) Contact us (d) about.html - 30.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
31.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) https://example.com (b) Play games (c) href (d) Take the quiz - 32.True or false: <input> is an empty tag. (a) True (b) False
- 33.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h3> or <h6>? (a) <h4> (b) <h3> (c) <h6> (d) <h1>
-
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="200"> (a) moon.png (b) Our school bus (c) width (d) The full moon -
35.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Stars shine</p> -
36.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>My pets</h2>
<p>My best friend</p>
<h2>Rain today</h2>
<p>Cricket is fun.</p> -
37.📋 What number does the browser show next to “Banana”?
<ol>
<li>Papaya</li>
<li>Grapes</li>
<li>Banana</li>
<li>Mango</li>
<li>Guava</li>
<li>Orange</li>
</ol> -
38.📋 What number does the browser show next to “Banana”?
<ol start="6">
<li>Jamun</li>
<li>Litchi</li>
<li>Banana</li>
<li>Orange</li>
<li>Papaya</li>
</ol> -
39.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Rain today</p>
<!-- <p>Fun facts</p> --> (a) My pets (b) Fun facts (c) Rain today - 40.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
Answer key
- opens web pages for us
- <h1>
- an empty tag
- <
- href
- No
- a closing tag
- An old fort
- to leave notes
- a line across the page
- 6
- in the same tab
- Markup
- a web server
- <p>
- quiz.html
- </html>
- answers page requests
- 1
- </em>
- 2
- 250
- 3
- Good morning!
- <a>
- is where we type code
- bullets
- </p>
- games.html
- in the head
- Take the quiz
- True
- <h6>
- The full moon
- 3
- 3
- 3
- 8
- Fun facts
- opens it in a new tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids