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: <h1> has a closing tag. (a) True (b) False
- 2.True or false: in <img>, height describes the picture. (a) True (b) False
-
3.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) My drawings (c) body (d) Space Facts - 4.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a closing tag (d) a comment
- 5.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h3> (b) <h4> (c) <h1> (d) <h6>
- 6.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) src (d) width
- 7.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) shows line numbers (d) stores a website’s files
-
8.🔍 One closing tag is missing. Which one?
<strong>Good morning!</strong>
<i>My best friend</i>
<b>The red kite (a) </strong> (b) </i> (c) </em> (d) </b> -
9.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) maths.html (b) Visit the site (c) contact.html (d) https://example.com -
10.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow</p> -
11.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Sky is blue<br>Rivers flow<br>Roses are red<br>Kites fly high</p> -
12.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Kites fly high</p> - 13.Which of these is an opening tag? (a) </li> (b) </p> (c) </title> (d) <h1>
-
14.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>Good morning!</h2>
<p>I love mangoes.</p>
<p>Rain today</p> -
15.🔗 Which address opens when you click this link?
<a href="games.html">Art corner</a> (a) contact.html (b) about.html (c) games.html (d) Art corner -
16.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<p>My pets</p> - 17.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
-
18.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Fun facts</p>
<!-- <p>My pets</p> --> - 19.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
- 20.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1/> (c) <\h1> (d) <h1>
-
21.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p> - 22.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
- 23.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 24.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <ul> (d) <meta charset="utf-8">
- 25.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h5> or <h1>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
- 26.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
-
27.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) bus.jpg (b) dog.jpg (c) A happy dog (d) moon.png - 28.True or false: HTML on its own can make a form. (a) True (b) False
-
29.📋 What number does the browser show next to “Papaya”?
<ol start="5">
<li>Guava</li>
<li>Banana</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
<li>Litchi</li>
</ol> - 30.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>
-
31.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine<br>Roses are red</p> - 32.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
-
33.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> --> -
34.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<p>My pets</p> (a) My pets (b) The red kite (c) Our school trip - 35.True or false: <li> goes inside ul or ol. (a) True (b) False
-
36.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Fun facts</h2>
<h2>Hello, world!</h2>
<h2>Good morning!</h2> - 37.True or false: <b> has a closing tag. (a) False (b) True
- 38.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h1>? (a) <h6> (b) <h4> (c) <h1> (d) <h3>
-
39.🔗 Which words do you click on?
<a href="art.html">Art corner</a> (a) Art corner (b) href (c) School news (d) art.html - 40.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h2>? (a) <h3> (b) <h4> (c) <h2> (d) <h6>
Answer key
- True
- False
- My drawings
- an attribute
- <h1>
- alt
- shows line numbers
- </b>
- contact.html
- 2
- 5
- 3
- <h1>
- 3
- games.html
- 2
- <!--
- 2
- <a href="about.html">
- </h1>
- 1
- <
- an opening tag
- <ul>
- <h1>
- alt
- dog.jpg
- True
- 8
- <img>
- 3
- <!DOCTYPE html>
- 1
- Our school trip
- True
- 1
- True
- <h6>
- Art corner
- <h6>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids