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 of these is an opening tag? (a) </body> (b) <body> (c) </p> (d) </b>
- 2.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
- 3.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h2> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
- 4.💬 Does the browser show comments on the page? (a) Yes (b) No
-
5.🔍 One closing tag is missing. Which one?
<i>Cricket is fun.</i>
<small>I love mangoes.
<strong>Our school trip</strong> (a) </i> (b) </strong> (c) </small> (d) </p> - 6.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>
- 7.True or false: in <img>, alt is read by screen readers. (a) False (b) True
- 8.Which of these is true of a web server? (a) shows pages from the web (b) colours code to help us (c) sends pages over the net (d) turns HTML into a page
- 9.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) src (d) height
- 10.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </body> (c) </html> (d) <head>
- 11.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) width (d) height
- 12.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </head> (b) </body>
- 13.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
-
14.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) Take the quiz (b) Play games (c) href (d) https://example.com - 15.True or false: <img> is an empty tag. (a) False (b) True
- 16.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 17.True or false: a code editor is where we type code. (a) False (b) True
- 18.True or false: <ul> lists steps in order. (a) True (b) False
-
19.🔍 One closing tag is missing. Which one?
<b>Hello, world!</b>
<strong>Our school trip
<h3>Fun facts</h3> (a) </small> (b) </b> (c) </h3> (d) </strong> -
20.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Rivers flow<br>Roses are red<br>Stars shine</p> - 21.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
- 22.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
- 23.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
- 24.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 25.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 26.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
-
27.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) maths.html (b) https://example.com (c) contact.html (d) Play games - 28.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) is where we type code (d) stores a website’s files
-
29.🔗 Which words do you click on?
<a href="quiz.html">Contact us</a> (a) Visit the site (b) href (c) Contact us (d) quiz.html - 30.True or false: a web server sends pages over the net. (a) False (b) True
- 31.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
- 32.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
-
33.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Litchi</li>
</ol> -
34.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>Hello, world!</h2>
<p>My pets</p>
<h2>Our school trip</h2>
<h3>My best friend</h3> -
35.🔗 Which address opens when you click this link?
<a href="art.html">School news</a> (a) quiz.html (b) School news (c) art.html (d) news.html -
36.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) Welcome! (c) body (d) My Hobbies - 37.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
- 38.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) hosts websites online (d) shows pages from the web
- 39.🔍 Which is the odd one out? (a) stores a website’s files (b) sends pages over the net (c) turns HTML into a page (d) answers page requests
- 40.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
Answer key
- <body>
- <h5>
- <h1>
- No
- </small>
- <h1>
- True
- sends pages over the net
- src
- </html>
- alt
- </head>
- <h5>
- Take the quiz
- True
- Yes
- True
- False
- </strong>
- 5
- <ol>
- False
- <!--
- in the body
- has a closing tag
- opens it in a new tab
- contact.html
- stores a website’s files
- Contact us
- True
- <li>
- a line across the page
- 5
- 4
- art.html
- Welcome!
- <!DOCTYPE html>
- shows pages from the web
- turns HTML into a page
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids