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.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a hash # (d) a dollar $
- 2.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
- 3.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <h6> (d) <p>
- 4.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 5.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 6.True or false: <hr> has a closing tag. (a) False (b) True
-
7.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Fun facts</p>
<!-- <p>Rain today</p> --> - 8.True or false: a web browser shows line numbers. (a) True (b) False
- 9.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h4> or <h1>? (a) <h4> (b) <h6> (c) <h1> (d) <h3>
-
10.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p> - 11.True or false: <p> goes in the body. (a) False (b) True
- 12.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
-
13.🔗 Which address opens when you click this link?
<a href="quiz.html">Maths fun</a> (a) Maths fun (b) about.html (c) games.html (d) quiz.html -
14.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Grapes</li>
</ol> (a) numbers (b) bullets - 15.Which of these is an empty tag? (a) <p> (b) <h1> (c) <br> (d) <b>
-
16.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h3>Cricket is fun.</h3>
<h2>I love mangoes.</h2>
<p>Hello, world!</p> - 17.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
- 18.True or false: HTML on its own can make bullet lists. (a) False (b) True
-
19.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>Our school trip</p> (a) Our school trip (b) Hello, world! (c) Good morning! (d) My best friend - 20.Which of these is true of a web server? (a) sends pages over the net (b) shows line numbers (c) saves our .html files (d) opens web pages for us
- 21.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
- 22.True or false: in <img>, height tells which image to load. (a) True (b) False
- 23.True or false: HTML on its own can make a form. (a) False (b) True
- 24.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
- 25.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) < (d) [
- 26.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h4> (d) <h6>
- 27.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) height (d) src
- 28.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h5> or <h2>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
-
29.🔍 Which line is missing its closing tag?
line 1: <strong>The red kite</strong>
line 2: <u>Our school trip
line 3: <small>Hello, world!</small> (a) line 1 (b) line 2 (c) line 3 - 30.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) </body> (c) </html> (d) <!DOCTYPE html>
-
31.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) contact.html (b) href (c) Maths fun (d) Visit the site - 32.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
-
33.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) My Hobbies (c) Easy snacks (d) Thanks for visiting. -
34.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>Cricket is fun.</p> -
35.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Kites fly high<br>Birds sing<br>Rivers flow</p> -
36.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<p>Rain today</p> -
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) A happy dog (b) width (c) cake.jpg (d) Birthday cake - 38.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 39.🔍 Which is the odd one out? (a) has an address bar (b) turns HTML into a page (c) saves our .html files (d) shows pages from the web
- 40.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
Answer key
- a slash /
- True
- <h6>
- Yes
- False
- False
- 2
- False
- <h1>
- 3
- True
- <h1>
- quiz.html
- numbers
- <br>
- 3
- <h6>
- True
- My best friend
- sends pages over the net
- a code editor
- False
- True
- width
- <
- <h1>
- alt
- <h6>
- line 2
- <!DOCTYPE html>
- Visit the site
- <h1>
- Easy snacks
- 2
- 5
- 3
- Birthday cake
- -->
- saves our .html files
- href
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids