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.True or false: <ol> is an ordered list. (a) False (b) True
-
2.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Jamun</li>
</ul> (a) bullets (b) numbers - 3.True or false: in <img>, alt is read by screen readers. (a) False (b) True
- 4.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
- 5.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h5>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
- 6.Which of these has a closing tag? (a) <img> (b) <hr> (c) <title> (d) <br>
- 7.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
- 8.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 9.🔍 Which is the odd one out? (a) stores a website’s files (b) saves our .html files (c) colours code to help us (d) is where we type code
- 10.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
- 11.True or false: a web browser turns HTML into a page. (a) False (b) True
-
12.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>Fun facts</h3>
<h3>Cricket is fun.</h3> -
13.🔍 One closing tag is missing. Which one?
<h1>Our school trip</h1>
<h2>The red kite</h2>
<p>Rain today (a) </em> (b) </h1> (c) </p> (d) </h2> - 14.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
- 15.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) address (d) editor
-
16.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>My pets</h2>
<p>Hello, world!</p>
<p>Hello, world!</p>
<p>Good morning!</p> -
17.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>Cricket is fun.</h4>
<h2>My pets</h2> - 18.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <ol> (d) <br>
- 19.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
20.🔗 Where does this link open?
<a href="contact.html">Maths fun</a> (a) in the same tab (b) in a new tab -
21.🔗 Where does this link open?
<a href="quiz.html">About us</a> (a) in a new tab (b) in the same tab - 22.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) <\h3> (c) <h3/> (d) </h3>
- 23.True or false: <li> goes inside ul or ol. (a) False (b) True
- 24.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) makes it blank (d) hides the link
- 25.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 26.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
27.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="300"> -
28.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Welcome! (b) Thanks for visiting. (c) index.html (d) Art Gallery - 29.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
- 30.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h5> or <h3>? (a) <h3> (b) <h4> (c) <h2> (d) <h5>
- 31.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
-
32.🔍 One closing tag is missing. Which one?
<h3>My pets</h3>
<b>Our school trip
<h1>Fun facts</h1> (a) </h3> (b) </u> (c) </h1> (d) </b> - 33.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
- 34.True or false: <li> is one item of a list. (a) False (b) True
-
35.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) news.html (b) Visit the site (c) href (d) Maths fun -
36.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<!-- <p>The red kite</p> --> (a) The red kite (b) I love mangoes. (c) My pets -
37.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> - 38.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <!DOCTYPE html> (c) </body> (d) </head>
- 39.Which of these is true of a web browser? (a) answers page requests (b) sends pages over the net (c) hosts websites online (d) has an address bar
-
40.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p> (a) Our school trip (b) I love mangoes. (c) Hello, world!
Answer key
- True
- bullets
- True
- on the browser tab
- <h2>
- <title>
- href
- Yes
- stores a website’s files
- <ul>
- True
- 3
- </p>
- <img>
- element
- 4
- 3
- <ul>
- an opening tag
- in the same tab
- in the same tab
- </h3>
- True
- opens it in a new tab
- an empty tag
- Yes
- 300
- Art Gallery
- <a>
- <h5>
- a web server
- </b>
- <h1>
- True
- Visit the site
- The red kite
- 50
- </html>
- has an address bar
- Hello, world!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids