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.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 2.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
- 3.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) HyperText (c) Hot Tags (d) Home Text
- 4.Which of these goes in the body? (a) <style> (b) <p> (c) <meta charset="utf-8"> (d) <title>
-
5.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Hello, world!</p>
<p>Our school trip</p> - 6.Which of these is an opening tag? (a) <body> (b) </p> (c) </title> (d) </body>
- 7.True or false: <ul> lists steps in order. (a) False (b) True
-
8.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>The red kite</p> -->
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> --> - 9.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 10.True or false: HTML on its own can add pictures to a page. (a) False (b) True
- 11.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 6 (d) 10
- 12.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 13.Which of these is a closing tag? (a) <body> (b) </title> (c) <p> (d) <h1>
-
14.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Good morning!</p> -->
<p>My best friend</p> -
15.🔗 Which words do you click on?
<a href="about.html">Play games</a> (a) about.html (b) About us (c) Play games (d) href - 16.Which of these is an opening tag? (a) </title> (b) </h1> (c) <p> (d) </li>
- 17.True or false: in <img>, height sets how tall it is. (a) False (b) True
- 18.Which of these is true of a web browser? (a) sends pages over the net (b) is where we type code (c) shows line numbers (d) has an address bar
-
19.📋 What number does the browser show next to “Mango”?
<ol>
<li>Jamun</li>
<li>Orange</li>
<li>Mango</li>
<li>Papaya</li>
<li>Banana</li>
</ol> - 20.True or false: <li> has a closing tag. (a) True (b) False
- 21.True or false: <style> goes in the head. (a) False (b) True
-
22.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) href (b) School news (c) Take the quiz (d) games.html - 23.True or false: HTML on its own cannot run a game loop. (a) False (b) True
-
24.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) bus.jpg (b) fort.jpg (c) Our school bus (d) tiger.jpg - 25.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
- 26.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
-
27.🔗 Where does this link open?
<a href="quiz.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab -
28.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="100"> - 29.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 30.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
-
31.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<!-- <p>Rain today</p> --> -
32.🔗 Where does this link open?
<a href="about.html" target="_blank">School news</a> (a) in the same tab (b) in a new tab -
33.🔗 Where does this link open?
<a href="about.html">Take the quiz</a> (a) in the same tab (b) in a new tab -
34.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) art.html (b) news.html (c) Visit the site (d) maths.html - 35.True or false: a web browser shows pages from the web. (a) True (b) False
- 36.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
- 37.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
- 38.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 39.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
-
40.📋 What number does the browser show next to “Litchi”?
<ol start="3">
<li>Guava</li>
<li>Banana</li>
<li>Litchi</li>
</ol>
Answer key
- has a closing tag
- <!DOCTYPE html>
- HyperText
- <p>
- 1
- <body>
- False
- 1
- Yes
- True
- 6
- an opening tag
- </title>
- 1
- Play games
- <p>
- True
- has an address bar
- 3
- True
- True
- School news
- True
- bus.jpg
- <h6>
- <img>
- in a new tab
- 100
- in the body
- <ul>
- 1
- in a new tab
- in the same tab
- maths.html
- True
- starts a new line
- opens it in a new tab
- No
- 1
- 5
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids