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.🔍 One closing tag is missing. Which one?
<b>My best friend</b>
<p>Rain today</p>
<u>Hello, world! (a) </p> (b) </u> (c) </strong> (d) </b> -
2.🔍 One closing tag is missing. Which one?
<h3>Rain today</h3>
<h1>Our school trip</h1>
<h2>Hello, world! (a) </h1> (b) </h3> (c) </small> (d) </h2> - 3.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h6> (d) <h2>
-
4.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) Cricket Club (b) Welcome! (c) I like to read. (d) index.html -
5.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Stars shine</p> -
6.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>My pets</p> -->
<p>The red kite</p> (a) My pets (b) My best friend (c) The red kite -
7.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Rain today</p>
<h2>My best friend</h2>
<h2>Fun facts</h2>
<h2>My pets</h2>
<h2>My best friend</h2> -
8.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) Maths fun (b) contact.html (c) href (d) Visit the site - 9.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
-
10.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h3>Our school trip</h3>
<p>Cricket is fun.</p>
<h2>Rain today</h2> - 11.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 12.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) src (d) alt
- 13.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h6>? (a) <h5> (b) <h6> (c) <h2> (d) <h3>
- 14.🔗 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">
- 15.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
- 16.True or false: <hr> is an empty tag. (a) False (b) True
-
17.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>The red kite</p> -->
<p>Rain today</p> (a) My pets (b) The red kite (c) Rain today -
18.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) My Hobbies (c) I like to read. (d) Match report - 19.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 20.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
21.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Orange</li>
</ul> - 22.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the title (d) the head
- 23.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 10 (d) 3
- 24.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
-
25.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Sky is blue<br>Rivers flow<br>Roses are red</p> -
26.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Planets (b) Art Gallery (c) index.html (d) Thanks for visiting. - 27.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
-
28.📋 What number does the browser show next to “Papaya”?
<ol start="3">
<li>Grapes</li>
<li>Litchi</li>
<li>Orange</li>
<li>Mango</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> - 29.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h6>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
-
30.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Space Facts (b) body (c) All about me (d) Thanks for visiting. - 31.Which of these is an empty tag? (a) <h1> (b) <b> (c) <p> (d) <br>
- 32.🔍 Which is the odd one out? (a) is where we type code (b) opens web pages for us (c) turns HTML into a page (d) shows pages from the web
- 33.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h6>? (a) <h1> (b) <h2> (c) <h5> (d) <h6>
-
34.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>The red kite</p>
<p>Rain today</p>
<h2>I love mangoes.</h2> - 35.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <h2/> (c) </h2> (d) <\h2>
-
36.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) cake.jpg (b) Birthday cake (c) A happy dog (d) width -
37.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<p>Rain today</p> (a) My pets (b) The red kite (c) Hello, world! (d) Rain today -
38.🔗 Where does this link open?
<a href="art.html">Contact us</a> (a) in a new tab (b) in the same tab - 39.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h6> (d) <h2>
-
40.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Jamun</li>
<li>Grapes</li>
<li>Mango</li>
</ol>
Answer key
- </u>
- </h2>
- <h6>
- Cricket Club
- 3
- My pets
- 2
- Visit the site
- <h4>
- 3
- True
- alt
- <h6>
- <a href="about.html">
- <a>
- True
- The red kite
- Match report
- True
- has a closing tag
- 5
- the body
- 6
- No
- 5
- Art Gallery
- an attribute
- 8
- <h1>
- All about me
- <br>
- is where we type code
- <h6>
- 2
- </h2>
- Birthday cake
- The red kite
- in the same tab
- <h2>
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids