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 items does this list show?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Banana</li>
</ol> - 2.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
- 3.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 4.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a picture (d) a table
- 5.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) alt (d) height
-
6.🔗 Which words do you click on?
<a href="art.html">Visit the site</a> (a) Visit the site (b) href (c) Maths fun (d) art.html -
7.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Cricket is fun.</h2>
<h2>Fun facts</h2> -
8.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) Riya’s Recipes (b) All about me (c) body (d) Mars is red. - 9.🔍 Which is the odd one out? (a) opens web pages for us (b) stores a website’s files (c) has an address bar (d) shows pages from the web
-
10.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>Rain today</p> -->
<p>Hello, world!</p> - 11.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h3>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
- 12.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
-
13.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<!-- <p>The red kite</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>Hello, world!</p> --> -
14.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="350"> - 15.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 16.Which of these goes in the body? (a) <img> (b) <meta charset="utf-8"> (c) <style> (d) <title>
-
17.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) https://example.com (b) maths.html (c) art.html (d) About us -
18.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>The red kite</h2>
<h2>The red kite</h2>
<h2>Hello, world!</h2>
<h2>My pets</h2>
<p>Hello, world!</p> -
19.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Grapes</li>
</ol> (a) bullets (b) numbers - 20.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
- 21.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 22.True or false: <meta> is an empty tag. (a) False (b) True
- 23.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 24.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
- 25.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 26.True or false: a web browser turns HTML into a page. (a) False (b) True
- 27.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <p> (d) <h1>
- 28.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <table> (d) <title>
- 29.Which of these has a closing tag? (a) <meta> (b) <input> (c) <br> (d) <h1>
- 30.Which of these is true of a web server? (a) answers page requests (b) turns HTML into a page (c) shows pages from the web (d) saves our .html files
- 31.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
- 32.📝 What does <br> do? (a) adds a picture (b) makes a list (c) starts a new line (d) makes text bold
- 33.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <body> (c) <!DOCTYPE html> (d) <html>
- 34.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
-
35.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h4>Our school trip</h4>
<p>Rain today</p>
<h2>My best friend</h2>
<p>Hello, world!</p> - 36.True or false: <li> is an empty tag. (a) False (b) True
-
37.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>My pets</p>
<p>My pets</p>
<p>My pets</p> -
38.🔗 Which address opens when you click this link?
<a href="art.html">Contact us</a> (a) Contact us (b) quiz.html (c) news.html (d) art.html - 39.Which of these is an empty tag? (a) <li> (b) <b> (c) <h1> (d) <hr>
- 40.True or false: <ul> shows bullet points. (a) True (b) False
Answer key
- 5
- href
- an empty tag
- a line across the page
- alt
- Visit the site
- 1
- All about me
- stores a website’s files
- 1
- <h1>
- False
- 1
- 350
- a closing tag
- <img>
- https://example.com
- 2
- numbers
- the body
- has a closing tag
- True
- Yes
- <ul>
- an opening tag
- True
- <h1>
- <table>
- <h1>
- answers page requests
- -->
- starts a new line
- <!DOCTYPE html>
- <a>
- 3
- False
- 5
- art.html
- <hr>
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids