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 tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
- 2.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
-
3.🔗 Which address opens when you click this link?
<a href="maths.html">Play games</a> (a) news.html (b) Play games (c) maths.html (d) art.html - 4.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
- 5.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
6.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Hello, world!</p>
<!-- <p>Fun facts</p> --> (a) Fun facts (b) My best friend (c) Hello, world! - 7.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3> (c) </h3> (d) <h3/>
-
8.🔗 Which address opens when you click this link?
<a href="games.html">School news</a> (a) about.html (b) contact.html (c) games.html (d) School news - 9.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h3>? (a) <h4> (b) <h6> (c) <h1> (d) <h3>
- 10.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
- 11.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
- 12.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
- 13.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <ol> (d) <li>
- 14.Which of these is a closing tag? (a) </h1> (b) <h1> (c) <b> (d) <li>
-
15.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="300"> (a) Map of India (b) map.png (c) dog.jpg (d) cake.jpg - 16.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
- 17.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 6 (d) 1
- 18.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
19.🔗 Where does this link open?
<a href="contact.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab - 20.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
-
21.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Banana</li>
<li>Papaya</li>
<li>Guava</li>
</ol> - 22.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
- 23.Which of these is true of a code editor? (a) colours code to help us (b) hosts websites online (c) sends pages over the net (d) opens web pages for us
-
24.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Match report (b) Cricket Club (c) Thanks for visiting. (d) body - 25.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <!DOCTYPE html> (c) </head> (d) <html>
- 26.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
- 27.Which of these is an opening tag? (a) <p> (b) </title> (c) </b> (d) </body>
- 28.True or false: <title> has a closing tag. (a) False (b) True
- 29.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 30.Which of these is an empty tag? (a) <p> (b) <h1> (c) <title> (d) <input>
- 31.Which of these is true of a web server? (a) opens web pages for us (b) colours code to help us (c) sends pages over the net (d) shows line numbers
- 32.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
-
33.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red</p> - 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
- 35.True or false: <li> shows bullet points. (a) True (b) False
-
36.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="200"> -
37.🔗 Which words do you click on?
<a href="about.html">Art corner</a> (a) School news (b) Art corner (c) href (d) about.html - 38.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as 5 spaces (d) as a new line
- 39.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
- 40.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
Answer key
- <h1>
- 6
- maths.html
- <!--
- a closing tag
- Fun facts
- </h3>
- games.html
- <h1>
- <a>
- to leave notes
- to describe the image
- <li>
- </h1>
- map.png
- opens it in a new tab
- 1
- in the head
- in a new tab
- <h2>
- 6
- href
- colours code to help us
- Match report
- <!DOCTYPE html>
- <ol>
- <p>
- True
- No
- <input>
- sends pages over the net
- Yes
- 2
- <a href="about.html">
- False
- 200
- Art corner
- as one space
- <ol>
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids