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 code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
- 2.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
- 3.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
- 4.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
-
5.🔗 Which address opens when you click this link?
<a href="maths.html">Play games</a> (a) news.html (b) art.html (c) maths.html (d) Play games - 6.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 7.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h3>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
-
8.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) about.html (b) games.html (c) Art corner (d) quiz.html -
9.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) My drawings (c) body (d) Cricket Club - 10.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 11.Which of these is a closing tag? (a) </h1> (b) <li> (c) <p> (d) <body>
-
12.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets - 13.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
-
14.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<p>Rain today</p> -
15.📋 What number does the browser show next to “Mango”?
<ol start="5">
<li>Jamun</li>
<li>Mango</li>
<li>Banana</li>
<li>Grapes</li>
<li>Guava</li>
</ol> -
16.🔍 One closing tag is missing. Which one?
<i>Rain today
<b>My pets</b>
<h3>I love mangoes.</h3> (a) </h3> (b) </b> (c) </strong> (d) </i> -
17.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Papaya</li>
</ul> (a) bullets (b) numbers - 18.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
- 19.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h3> or <h4>? (a) <h6> (b) <h4> (c) <h5> (d) <h3>
-
20.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Rain today</p>
<h2>I love mangoes.</h2>
<h2>The red kite</h2>
<p>Cricket is fun.</p> -
21.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>My pets</h4>
<h2>Hello, world!</h2>
<h4>Hello, world!</h4>
<h2>Our school trip</h2> -
22.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p> -
23.🔍 One closing tag is missing. Which one?
<p>Good morning!</p>
<strong>Fun facts</strong>
<small>I love mangoes. (a) </strong> (b) </p> (c) </small> (d) </h3> - 24.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
-
25.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="100"> - 26.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 27.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h4>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>
-
28.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<!-- <p>Rain today</p> --> (a) Hello, world! (b) Rain today (c) Cricket is fun. - 29.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
- 30.📄 Where does the text of <title> appear? (a) on the browser tab (b) in a big heading (c) at the bottom (d) nowhere
- 31.True or false: <ul> is an ordered list. (a) False (b) True
-
32.🔗 Where does this link open?
<a href="news.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 33.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 34.True or false: a code editor opens web pages for us. (a) True (b) False
- 35.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) element (d) editor
-
36.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Fun facts</p>
<p>Rain today</p>
<!-- <p>I love mangoes.</p> --> - 37.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
- 38.Which of these has a closing tag? (a) <ul> (b) <br> (c) <hr> (d) <meta>
-
39.🔗 Which address opens when you click this link?
<a href="about.html">About us</a> (a) about.html (b) About us (c) https://example.com (d) contact.html - 40.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
Answer key
- <a href="about.html">
- opens it in a new tab
- -->
- to describe the image
- maths.html
- Yes
- <h1>
- quiz.html
- My drawings
- a closing tag
- </h1>
- bullets
- <h5>
- 3
- 6
- </i>
- bullets
- <h1>
- <h6>
- 3
- 5
- 1
- </small>
- <li>
- 100
- True
- <h1>
- Rain today
- <!--
- on the browser tab
- False
- in a new tab
- Yes
- False
- element
- 2
- a line across the page
- <ul>
- about.html
- <ul>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids