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.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Cricket is fun.</p>
<h2>Fun facts</h2> - 2.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
- 3.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 4.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
- 5.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
- 6.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
-
7.📋 What number does the browser show next to “Litchi”?
<ol start="7">
<li>Guava</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> -
8.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="50"> (a) Map of India (b) map.png (c) cake.jpg (d) dog.jpg -
9.🔗 Which address opens when you click this link?
<a href="maths.html">Play games</a> (a) news.html (b) art.html (c) Play games (d) maths.html -
10.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) School news (b) games.html (c) href (d) Art corner -
11.🔍 Which line is missing its closing tag?
line 1: <u>My best friend</u>
line 2: <p>The red kite
line 3: <h1>Good morning!</h1> (a) line 3 (b) line 2 (c) line 1 -
12.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Rivers flow</p> - 13.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
14.🔍 One closing tag is missing. Which one?
<p>Our school trip</p>
<b>Cricket is fun.</b>
<small>Fun facts (a) </p> (b) </h1> (c) </b> (d) </small> - 15.True or false: <li> has a closing tag. (a) False (b) True
- 16.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 17.Which of these is a closing tag? (a) <h1> (b) <p> (c) <title> (d) </li>
- 18.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
- 19.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong> (c) </strong> (d) <strong/>
- 20.True or false: a code editor opens web pages for us. (a) False (b) True
- 21.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 4 (d) 6
- 22.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
-
23.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high<br>Sky is blue<br>Stars shine<br>Roses are red</p> - 24.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
25.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="150"> (a) Map of India (b) cake.jpg (c) map.png (d) dog.jpg -
26.🔗 Which words do you click on?
<a href="news.html">Maths fun</a> (a) href (b) news.html (c) Art corner (d) Maths fun - 27.True or false: a web server answers page requests. (a) True (b) False
- 28.🔍 Which is the odd one out? (a) opens web pages for us (b) has an address bar (c) shows pages from the web (d) sends pages over the net
- 29.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) alt (d) width
- 30.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Mouse (c) Markup (d) Modern
-
31.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>The red kite</p>
<!-- <p>Hello, world!</p> --> - 32.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
33.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>I love mangoes.</p>
<p>Good morning!</p>
<h4>I love mangoes.</h4> -
34.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Cricket is fun.</h2>
<h2>Hello, world!</h2>
<p>My best friend</p> -
35.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>The red kite</h2>
<p>Good morning!</p> - 36.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h3>
- 37.📄 Can HTML on its own make headings? (a) Yes (b) No
-
38.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) moon.png (b) cake.jpg (c) dog.jpg (d) Birthday cake - 39.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 40.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
Answer key
- 2
- <a>
- opens it in a new tab
- <h5>
- -->
- 1
- 9
- map.png
- maths.html
- Art corner
- line 2
- 3
- No
- </small>
- True
- in the body
- </li>
- False
- </strong>
- False
- 6
- <!DOCTYPE html>
- 5
- has a closing tag
- map.png
- Maths fun
- True
- sends pages over the net
- alt
- Markup
- 1
- an opening tag
- 2
- 2
- 2
- <h5>
- Yes
- cake.jpg
- has a closing tag
- a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids