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.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
- 2.📄 Can HTML on its own keep a high score? (a) No (b) Yes
-
3.🔍 One closing tag is missing. Which one?
<h2>Our school trip</h2>
<h1>Hello, world!
<i>I love mangoes.</i> (a) </i> (b) </h2> (c) </h1> (d) </p> - 4.Which of these is an opening tag? (a) </p> (b) </h1> (c) </body> (d) <h1>
- 5.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
- 6.True or false: <h1> goes in the body. (a) False (b) True
-
7.🔍 One closing tag is missing. Which one?
<h3>Fun facts
<u>I love mangoes.</u>
<em>Good morning!</em> (a) </i> (b) </u> (c) </h3> (d) </em> - 8.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
-
9.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>My pets</p>
<h4>I love mangoes.</h4> - 10.🖼️ Which attribute of <img> tells which image to load? (a) src (b) height (c) width (d) alt
- 11.📄 Can HTML on its own make headings? (a) Yes (b) No
- 12.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) Home Text (d) High Tech
-
13.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p> - 14.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
- 15.True or false: <li> goes inside ul or ol. (a) False (b) True
- 16.True or false: <hr> has a closing tag. (a) False (b) True
- 17.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
- 18.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
-
19.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets -
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) body (c) Riya’s Recipes (d) Planets - 21.Which of these goes in the head? (a) <img> (b) <h1> (c) <title> (d) <ul>
- 22.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
- 23.💬 How does an HTML comment end? (a) --> (b) */ (c) >> (d) //
-
24.🔗 Which words do you click on?
<a href="maths.html">About us</a> (a) href (b) maths.html (c) Contact us (d) About us - 25.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h3>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
- 26.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
-
27.🔍 Which line is missing its closing tag?
line 1: <strong>My pets</strong>
line 2: <i>Cricket is fun.</i>
line 3: <h3>I love mangoes. (a) line 2 (b) line 1 (c) line 3 - 28.True or false: HTML on its own cannot run a game loop. (a) True (b) False
- 29.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
- 30.True or false: <title> is an empty tag. (a) True (b) False
-
31.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p>
<p>My best friend</p> (a) I love mangoes. (b) Our school trip (c) My best friend - 32.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
33.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="400"> - 34.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
- 35.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
- 36.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
-
37.🔗 Which address opens when you click this link?
<a href="art.html">Visit the site</a> (a) quiz.html (b) news.html (c) Visit the site (d) art.html - 38.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
39.🔍 Which line is missing its closing tag?
line 1: <b>Rain today
line 2: <small>Good morning!</small>
line 3: <strong>Fun facts</strong> (a) line 3 (b) line 1 (c) line 2 - 40.True or false: <meta> has a closing tag. (a) False (b) True
Answer key
- <
- No
- </h1>
- <h1>
- <h2>
- True
- </h3>
- to leave notes
- 2
- src
- Yes
- HyperText
- 2
- <a href="about.html">
- True
- False
- 1
- <img>
- bullets
- Planets
- <title>
- to describe the image
- -->
- About us
- <h5>
- <!--
- line 3
- True
- the body
- False
- Our school trip
- an opening tag
- 400
- <h1>
- <a>
- <li>
- art.html
- in the body
- line 1
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids