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 one answers page requests? (a) a web server (b) a web browser (c) a code editor
-
2.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Papaya</li>
<li>Orange</li>
</ol> - 3.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
- 4.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em> (c) </em> (d) <em/>
-
5.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high</p> -
6.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<!-- <p>I love mangoes.</p> --> - 7.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
- 8.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) width (d) src
-
9.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> - 10.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <table> (c) <h1> (d) <ul>
-
11.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h4>Cricket is fun.</h4>
<h3>The red kite</h3>
<p>I love mangoes.</p> -
12.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) map.png (b) A red kite (c) kite.png (d) cake.jpg - 13.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h6> (d) <h1>
-
14.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Rivers flow<br>Stars shine</p> - 15.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) height (d) src
-
16.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) My Hobbies (b) Welcome! (c) Thanks for visiting. (d) index.html - 17.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
- 18.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 19.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
- 20.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
- 21.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
-
22.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> - 23.True or false: <ol> shows bullet points. (a) False (b) True
-
24.🔗 Which words do you click on?
<a href="about.html">Play games</a> (a) About us (b) href (c) Play games (d) about.html - 25.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
-
26.🔗 Where does this link open?
<a href="https://example.com">About us</a> (a) in a new tab (b) in the same tab - 27.True or false: <title> has a closing tag. (a) True (b) False
- 28.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 29.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
30.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<!-- <p>Good morning!</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>Our school trip</p> --> - 31.True or false: <li> is one item of a list. (a) True (b) False
- 32.True or false: HTML on its own cannot make links to pages. (a) True (b) False
-
33.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>My best friend</p>
<!-- <p>My pets</p> --> -
34.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Orange</li>
</ol> - 35.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) Home Text (d) High Tech
- 36.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 37.📝 What does <p> make? (a) a link (b) a picture (c) a paragraph (d) a table
- 38.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
-
39.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Litchi</li>
<li>Guava</li>
<li>Banana</li>
</ol> - 40.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
Answer key
- a web server
- 3
- False
- </em>
- 2
- 1
- <ul>
- src
- 300
- <meta charset="utf-8">
- 3
- kite.png
- <h1>
- 4
- height
- My Hobbies
- 1
- an empty tag
- <ol>
- <!--
- Yes
- 100
- False
- Play games
- <ul>
- in the same tab
- True
- has a closing tag
- in the body
- 1
- True
- False
- 2
- 2
- HyperText
- in the head
- a paragraph
- to leave notes
- 4
- <a href="about.html">
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids