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 headings are in this code?
<h1>Hello, world!</h1>
<p>Fun facts</p>
<p>My best friend</p> -
2.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<p>Hello, world!</p> -
3.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>My pets</h2>
<h2>The red kite</h2>
<h2>Hello, world!</h2>
<p>I love mangoes.</p> -
4.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Mango</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Orange</li>
</ul> - 5.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 6.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 7.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h6>? (a) <h5> (b) <h2> (c) <h3> (d) <h6>
- 8.True or false: <h1> is an empty tag. (a) False (b) True
- 9.True or false: a code editor sends pages over the net. (a) False (b) True
- 10.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
-
11.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Banana</li>
<li>Mango</li>
<li>Litchi</li>
</ol> - 12.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h4>? (a) <h1> (b) <h6> (c) <h4> (d) <h3>
- 13.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
- 14.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h4>? (a) <h5> (b) <h6> (c) <h1> (d) <h4>
- 15.True or false: in <img>, height sets how tall it is. (a) False (b) True
- 16.Which of these is true of a web browser? (a) saves our .html files (b) has an address bar (c) answers page requests (d) hosts websites online
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) Birthday cake (b) Map of India (c) map.png (d) width -
18.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) My drawings (c) body (d) Art Gallery - 19.True or false: HTML on its own cannot make a form. (a) True (b) False
- 20.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) </html> (b) <!DOCTYPE html>
- 21.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
- 22.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
- 23.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
- 24.True or false: HTML on its own cannot count button clicks. (a) False (b) True
- 25.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) a comment (d) an attribute
-
26.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Grapes</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers - 27.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <pic> (d) <img>
-
28.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p> (a) Fun facts (b) Cricket is fun. (c) The red kite (d) Our school trip - 29.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
- 30.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
- 31.Which of these is an empty tag? (a) <title> (b) <b> (c) <meta> (d) <li>
- 32.📝 What does <p> make? (a) a picture (b) a table (c) a paragraph (d) a link
-
33.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="250"> - 34.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
- 35.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
- 36.💬 How does an HTML comment end? (a) >> (b) */ (c) // (d) -->
-
37.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Stars shine<br>Rivers flow</p> - 38.True or false: HTML on its own cannot run a game loop. (a) False (b) True
-
39.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) about.html (b) quiz.html (c) School news (d) games.html - 40.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
Answer key
- 1
- 1
- 4
- 6
- Yes
- a closing tag
- <h2>
- False
- False
- <!DOCTYPE html>
- 4
- <h6>
- 1
- <h1>
- True
- has an address bar
- Map of India
- My drawings
- False
- <!DOCTYPE html>
- in the body
- a web browser
- the body
- True
- an attribute
- bullets
- <img>
- Our school trip
- <ol>
- opens it in a new tab
- <meta>
- a paragraph
- 250
- <a>
- <h4>
- -->
- 4
- True
- quiz.html
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids