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 heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h2>? (a) <h6> (b) <h2> (c) <h5> (d) <h1>
-
2.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="400"> -
3.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="250"> - 4.True or false: a web browser opens web pages for us. (a) True (b) False
-
5.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) Art Gallery (b) Match report (c) I like to read. (d) index.html -
6.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Rain today</p>
<h2>Fun facts</h2>
<h2>The red kite</h2>
<p>Cricket is fun.</p> - 7.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
- 8.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
9.🔗 Where does this link open?
<a href="quiz.html">Take the quiz</a> (a) in the same tab (b) in a new tab - 10.🔢 In a basic web page file, which comes LAST? (a) </body> (b) <!DOCTYPE html> (c) </html> (d) </head>
-
11.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="200"> - 12.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) < (d) [
- 13.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 3 (d) 1
- 14.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
- 15.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
-
16.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>Our school trip</p> -
17.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Fun facts (c) Hello, world! (d) My best friend -
18.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p> (a) I love mangoes. (b) Hello, world! (c) My pets - 19.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) stores a website’s files (d) has an address bar
- 20.Which of these is an empty tag? (a) <input> (b) <ul> (c) <title> (d) <b>
- 21.True or false: <ul> goes in the head. (a) True (b) False
-
22.🔍 Which line is missing its closing tag?
line 1: <em>Cricket is fun.
line 2: <u>I love mangoes.</u>
line 3: <b>Our school trip</b> (a) line 2 (b) line 1 (c) line 3 - 23.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) id (d) src
-
24.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="100"> - 25.True or false: <input> has a closing tag. (a) True (b) False
- 26.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 27.True or false: <a> goes in the head. (a) True (b) False
- 28.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 29.Which of these is a closing tag? (a) <p> (b) </h1> (c) <body> (d) <title>
- 30.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
31.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>Our school trip</h4>
<p>The red kite</p>
<p>My best friend</p> -
32.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!
line 2: <u>My pets</u>
line 3: <i>Rain today</i> (a) line 3 (b) line 1 (c) line 2 - 33.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h3> (b) <h4> (c) <h5> (d) <h1>
- 34.🔍 Which is the odd one out? (a) is where we type code (b) turns HTML into a page (c) colours code to help us (d) saves our .html files
-
35.📋 What number does the browser show next to “Orange”?
<ol start="6">
<li>Banana</li>
<li>Guava</li>
<li>Orange</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Papaya</li>
</ol> - 36.Which of these is an opening tag? (a) </body> (b) <li> (c) </p> (d) </b>
- 37.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 38.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
- 39.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 40.True or false: in <img>, src describes the picture. (a) True (b) False
Answer key
- <h1>
- 400
- 250
- True
- Art Gallery
- 3
- a code editor
- an opening tag
- in the same tab
- </html>
- 200
- <
- 1
- <ul>
- a slash /
- 4
- Fun facts
- My pets
- stores a website’s files
- <input>
- False
- line 1
- href
- 100
- False
- Yes
- False
- <ul>
- </h1>
- in the head
- 2
- line 1
- <h1>
- turns HTML into a page
- 8
- <li>
- No
- 6
- in the head
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids