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.📄 Can HTML on its own make headings? (a) Yes (b) No
-
2.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) maths.html (b) Contact us (c) contact.html (d) https://example.com - 3.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h6>? (a) <h1> (b) <h6> (c) <h5> (d) <h4>
- 4.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <head> (b) <!DOCTYPE html>
-
5.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Good morning!</p> -->
<p>Our school trip</p> -
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) tiger.jpg (b) A tiger asleep (c) width (d) A red kite - 7.Which of these is an opening tag? (a) </body> (b) <li> (c) </p> (d) </li>
- 8.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <img> (d) <style>
- 9.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 10.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <p> (d) <ol>
- 11.True or false: <li> is an unordered list. (a) False (b) True
-
12.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>My pets</p> -->
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> --> - 13.True or false: a web browser shows pages from the web. (a) True (b) False
-
14.📋 What number does the browser show next to “Guava”?
<ol start="4">
<li>Banana</li>
<li>Guava</li>
<li>Mango</li>
<li>Grapes</li>
<li>Jamun</li>
</ol> - 15.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
- 16.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
-
17.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Papaya</li>
<li>Banana</li>
</ol> - 18.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 19.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
-
20.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) about.html (b) Contact us (c) About us (d) href - 21.Which of these is an opening tag? (a) </li> (b) </title> (c) </b> (d) <b>
-
22.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) bus.jpg (b) dog.jpg (c) A happy dog (d) moon.png -
23.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) kite.png (b) tiger.jpg (c) A tiger asleep (d) map.png - 24.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
-
25.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) School news (b) Art corner (c) https://example.com (d) href - 26.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 27.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 28.Which of these goes in the body? (a) <p> (b) <style> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
- 29.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
- 30.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
-
31.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) Space Facts (b) I like to read. (c) index.html (d) My drawings - 32.True or false: <ol> is an ordered list. (a) True (b) False
- 33.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
-
34.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Our school trip</p>
<p>Fun facts</p>
<h4>Our school trip</h4> - 35.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
-
36.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Hello, world!</p>
<p>Our school trip</p> - 37.True or false: <li> shows bullet points. (a) False (b) True
-
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) cake.jpg (b) Birthday cake (c) width (d) A happy dog -
39.🔍 Which line is missing its closing tag?
line 1: <em>The red kite</em>
line 2: <small>Rain today
line 3: <i>Good morning!</i> (a) line 1 (b) line 2 (c) line 3 - 40.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) alt (c) height (d) src
Answer key
- Yes
- contact.html
- <h1>
- <!DOCTYPE html>
- 2
- A tiger asleep
- <li>
- <img>
- in the head
- <li>
- False
- 2
- True
- 5
- Markup
- <!--
- 4
- an empty tag
- in the head
- About us
- <b>
- dog.jpg
- tiger.jpg
- <ol>
- Art corner
- in the head
- an empty tag
- <p>
- <li>
- <img>
- Space Facts
- True
- <ol>
- 2
- href
- 1
- False
- Birthday cake
- line 2
- alt
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids