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 of these goes in the head? (a) <p> (b) <h1> (c) <table> (d) <style>
- 2.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
- 3.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
- 4.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
- 5.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
- 6.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
-
7.🔗 Where does this link open?
<a href="maths.html">School news</a> (a) in the same tab (b) in a new tab - 8.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the doctype (d) the head
- 9.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
- 10.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h4> (d) <h1>
-
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep - 12.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h6> or <h5>? (a) <h5> (b) <h6> (c) <h2> (d) <h3>
- 13.Which of these has a closing tag? (a) <title> (b) <br> (c) <input> (d) <img>
-
14.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>I love mangoes.</p> --> -
15.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<!-- <p>My best friend</p> --> - 16.💬 Does the browser show comments on the page? (a) No (b) Yes
- 17.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
- 18.True or false: <ul> has a closing tag. (a) True (b) False
- 19.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <img> (d) <style>
- 20.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 21.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>
- 22.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
23.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>Our school trip</h4>
<h2>Hello, world!</h2> -
24.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p> - 25.Which of these has a closing tag? (a) <br> (b) <input> (c) <ul> (d) <meta>
- 26.Which of these is an empty tag? (a) <b> (b) <title> (c) <h1> (d) <meta>
-
27.🔍 One closing tag is missing. Which one?
<h1>My pets</h1>
<b>Hello, world!</b>
<h2>Our school trip (a) </h2> (b) </h1> (c) </b> (d) </h3> -
28.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="50"> -
29.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>The red kite</p>
<p>Hello, world!</p> -
30.📋 What number does the browser show next to “Mango”?
<ol>
<li>Jamun</li>
<li>Orange</li>
<li>Mango</li>
</ol> - 31.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
- 32.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
- 33.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <hr> (d) <ol>
-
34.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Orange</li>
</ol> (a) bullets (b) numbers -
35.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Rain today</p>
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p> (a) Cricket is fun. (b) My pets (c) Rain today (d) I love mangoes. -
36.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="250"> - 37.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
- 38.📝 What does <p> make? (a) a link (b) a table (c) a paragraph (d) a picture
-
39.🔗 Which address opens when you click this link?
<a href="art.html">Visit the site</a> (a) quiz.html (b) Visit the site (c) art.html (d) news.html -
40.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>Our school trip</h2>
<h3>My pets</h3>
<p>My best friend</p>
Answer key
- <style>
- 1
- a web server
- False
- <h1>
- to leave notes
- in the same tab
- the body
- a web browser
- <h5>
- A tiger asleep
- <h6>
- <title>
- 1
- 1
- No
- </h2>
- True
- <img>
- No
- <h1>
- Yes
- 3
- 2
- <ul>
- <meta>
- </h2>
- 50
- 1
- 3
- <h2>
- as one space
- <ul>
- numbers
- My pets
- 250
- Yes
- a paragraph
- art.html
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids