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.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="200"> -
2.🔍 One closing tag is missing. Which one?
<h2>Good morning!
<strong>Fun facts</strong>
<p>Cricket is fun.</p> (a) </h2> (b) </p> (c) </h3> (d) </strong> - 3.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
- 4.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <a> (c) <meta charset="utf-8"> (d) <title>
- 5.True or false: a code editor answers page requests. (a) True (b) False
- 6.Which of these goes in the head? (a) <table> (b) <a> (c) <p> (d) <link rel="stylesheet">
- 7.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
8.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>Rain today</p> --> (a) Rain today (b) Hello, world! (c) My pets -
9.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Rain today</p>
<p>Rain today</p> - 10.True or false: <ol> is one item of a list. (a) False (b) True
- 11.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
- 12.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h2> or <h5>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
- 13.True or false: <br> has a closing tag. (a) False (b) True
-
14.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Our school trip</p>
<p>Cricket is fun.</p> - 15.True or false: HTML on its own can make tables. (a) False (b) True
-
16.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h2>The red kite</h2>
<h4>I love mangoes.</h4>
<p>Hello, world!</p> - 17.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
-
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="50"> (a) width (b) fort.jpg (c) A tiger asleep (d) An old fort - 19.📝 What do we need to write HTML? (a) a paintbrush (b) a microphone (c) a plain text editor (d) a printer
- 20.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 21.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h3>? (a) <h3> (b) <h4> (c) <h1> (d) <h2>
- 22.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
- 23.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
- 24.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h6>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
-
25.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Good morning!</p>
<p>Hello, world!</p>
<h4>Hello, world!</h4> - 26.True or false: in <img>, height tells which image to load. (a) False (b) True
- 27.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
-
28.🔗 Which words do you click on?
<a href="news.html">Take the quiz</a> (a) news.html (b) Play games (c) Take the quiz (d) href -
29.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Art Gallery (b) Easy snacks (c) index.html (d) Here is my best one. - 30.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 31.🏷️ Which is the closing tag for <b>? (a) <b/> (b) </b> (c) <b> (d) <\b>
- 32.True or false: <p> is an empty tag. (a) True (b) False
- 33.True or false: a web browser stores a website’s files. (a) True (b) False
- 34.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
- 35.True or false: <li> lists things in any order. (a) False (b) True
- 36.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
-
37.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>I love mangoes.</h3>
<h2>Rain today</h2>
<h3>The red kite</h3>
<p>Our school trip</p> - 38.📄 What is the first line of an HTML5 page? (a) <head> (b) <!DOCTYPE html> (c) <body> (d) <html>
- 39.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h6>? (a) <h5> (b) <h6> (c) <h3> (d) <h1>
- 40.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) <h1> (d) </h1>
Answer key
- 200
- </h2>
- 1
- <a>
- False
- <link rel="stylesheet">
- an empty tag
- Rain today
- 1
- False
- False
- <h6>
- False
- 2
- True
- 3
- a web browser
- An old fort
- a plain text editor
- a closing tag
- <h1>
- src
- starts a new line
- <h1>
- 2
- False
- a web browser
- Take the quiz
- Art Gallery
- in the body
- </b>
- False
- False
- <ul>
- False
- 6
- 4
- <!DOCTYPE html>
- <h6>
- </h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids