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.🧱 HTML gives a web page its ___. (a) colours (b) sound (c) structure (d) speed
- 2.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster
- 3.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
- 4.True or false: in <img>, src names the picture file. (a) False (b) True
-
5.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!</h2>
line 2: <h1>The red kite
line 3: <b>I love mangoes.</b> (a) line 2 (b) line 3 (c) line 1 -
6.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) Art Gallery (b) I like to read. (c) All about me (d) body - 7.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
- 8.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h4>? (a) <h6> (b) <h3> (c) <h4> (d) <h5>
-
9.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Orange</li>
</ol> - 10.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h1> or <h3>? (a) <h6> (b) <h3> (c) <h1> (d) <h4>
-
11.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<p>My pets</p> (a) I love mangoes. (b) Hello, world! (c) My pets - 12.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
-
13.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<p>Fun facts</p>
<p>My best friend</p> (a) My best friend (b) I love mangoes. (c) Fun facts (d) My pets - 14.Which of these is a closing tag? (a) <body> (b) <li> (c) <b> (d) </h1>
- 15.True or false: <ol> lists steps in order. (a) True (b) False
- 16.Which of these is true of a web browser? (a) colours code to help us (b) shows line numbers (c) hosts websites online (d) shows pages from the web
- 17.True or false: in <img>, height names the picture file. (a) True (b) False
-
18.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) games.html (b) about.html (c) Art corner (d) quiz.html - 19.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>
- 20.True or false: a code editor colours code to help us. (a) False (b) True
- 21.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h3>? (a) <h2> (b) <h4> (c) <h3> (d) <h6>
- 22.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
- 23.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 24.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an element name (d) an attribute
- 25.True or false: <meta> has a closing tag. (a) True (b) False
- 26.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 27.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <p> (d) <h6>
-
28.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) About us (b) about.html (c) Contact us (d) href -
29.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>My pets</h2>
<h4>Good morning!</h4>
<p>The red kite</p> -
30.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) maths.html (b) Take the quiz (c) href (d) Play games -
31.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="300"> -
32.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) All about me (c) index.html (d) Space Facts - 33.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 34.💬 How does an HTML comment end? (a) --> (b) >> (c) */ (d) //
-
35.🔍 One closing tag is missing. Which one?
<i>My best friend</i>
<strong>Our school trip</strong>
<em>Hello, world! (a) </i> (b) </strong> (c) </small> (d) </em> - 36.True or false: HTML on its own can add pictures to a page. (a) True (b) False
-
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) The full moon (b) width (c) A happy dog (d) dog.jpg -
38.🔍 Which line is missing its closing tag?
line 1: <small>The red kite
line 2: <strong>My pets</strong>
line 3: <b>Good morning!</b> (a) line 3 (b) line 2 (c) line 1 - 39.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 40.🖼️ Does <img> need a closing tag? (a) No (b) Yes
Answer key
- structure
- to describe the image
- <ol>
- True
- line 2
- All about me
- a web server
- <h3>
- 2
- <h6>
- Hello, world!
- <ul>
- My pets
- </h1>
- True
- shows pages from the web
- False
- quiz.html
- <html>
- True
- <h6>
- 1
- has a closing tag
- an attribute
- False
- a closing tag
- <h1>
- About us
- 3
- Take the quiz
- 300
- Space Facts
- Yes
- -->
- </em>
- True
- A happy dog
- line 1
- an opening tag
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids