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.Which of these is an opening tag? (a) </b> (b) </li> (c) </h1> (d) <p>
- 2.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) </h1> (c) <\h1> (d) <h1/>
-
3.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high</p> - 4.True or false: a code editor is where we type code. (a) False (b) True
- 5.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <body> (c) </body> (d) </html>
-
6.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) School news (b) about.html (c) games.html (d) quiz.html - 7.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) an attribute (d) a closing tag
- 8.Which of these is an empty tag? (a) <title> (b) <h1> (c) <p> (d) <input>
-
9.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Rain today</p>
<p>Cricket is fun.</p>
<h2>Fun facts</h2> - 10.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
- 11.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the head (d) the doctype
-
12.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="200"> - 13.True or false: a web browser turns HTML into a page. (a) False (b) True
- 14.True or false: <a> goes in the body. (a) False (b) True
- 15.True or false: in <img>, src is read by screen readers. (a) False (b) True
- 16.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 17.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) alt (d) src
-
18.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Space Facts (b) Easy snacks (c) index.html (d) Try this poha. - 19.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h6>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
- 20.Which of these is true of a code editor? (a) hosts websites online (b) shows pages from the web (c) turns HTML into a page (d) is where we type code
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) A red kite (b) width (c) tiger.jpg (d) A tiger asleep - 22.Which of these is a closing tag? (a) <title> (b) <p> (c) <b> (d) </body>
- 23.🔢 In a basic web page file, which comes first: “<html>” or “<body>”? (a) <body> (b) <html>
- 24.True or false: <li> is one item of a list. (a) True (b) False
-
25.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h2>Good morning!</h2>
<p>Our school trip</p> - 26.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
-
27.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> - 28.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
29.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="50"> -
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) map.png (b) Birthday cake (c) Map of India (d) width - 31.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <ul> (d) <hr>
-
32.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Good morning!</h2>
<h2>Cricket is fun.</h2> - 33.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ol> (d) <ul>
- 34.True or false: in <img>, src names the picture file. (a) False (b) True
- 35.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
-
36.🔍 Which line is missing its closing tag?
line 1: <b>Fun facts
line 2: <small>My pets</small>
line 3: <h2>The red kite</h2> (a) line 1 (b) line 3 (c) line 2 - 37.Which of these goes in the body? (a) <table> (b) <title> (c) <link rel="stylesheet"> (d) <style>
-
38.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="100"> - 39.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 40.Which of these is a closing tag? (a) </li> (b) <b> (c) <body> (d) <h1>
Answer key
- <p>
- </h1>
- 2
- True
- </html>
- quiz.html
- an attribute
- <input>
- 2
- <
- the body
- 200
- True
- True
- False
- Yes
- alt
- Space Facts
- <h6>
- is where we type code
- A tiger asleep
- </body>
- <html>
- True
- 2
- <ol>
- 350
- an opening tag
- 50
- Map of India
- <ul>
- 1
- <li>
- True
- a web browser
- line 1
- <table>
- 100
- an opening tag
- </li>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids