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 this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets -
2.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="350"> -
3.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine</p> -
4.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Rain today</p>
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> --> (a) Rain today (b) Cricket is fun. (c) Fun facts (d) I love mangoes. -
5.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) index.html (b) Try this poha. (c) My Hobbies (d) My drawings - 6.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </html> (c) <head> (d) </body>
-
7.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>The red kite</h4>
<p>Rain today</p>
<h4>Rain today</h4> -
8.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p> -
9.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) Contact us (b) href (c) art.html (d) About us -
10.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue</p> -
11.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) cake.jpg (b) Birthday cake (c) moon.png (d) dog.jpg - 12.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h5>
- 13.True or false: <li> goes inside ul or ol. (a) True (b) False
-
14.🔗 Which words do you click on?
<a href="news.html">Take the quiz</a> (a) Play games (b) news.html (c) href (d) Take the quiz - 15.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
- 16.True or false: in <img>, src names the picture file. (a) False (b) True
- 17.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
18.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Rain today</p> -->
<p>Hello, world!</p> (a) My best friend (b) My pets (c) Rain today (d) Hello, world! -
19.🔍 One closing tag is missing. Which one?
<u>Hello, world!
<h1>Fun facts</h1>
<b>Cricket is fun.</b> (a) </p> (b) </h1> (c) </b> (d) </u> -
20.🔗 Where does this link open?
<a href="maths.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab -
21.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="350"> -
22.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) Easy snacks (c) Space Facts (d) index.html - 23.Which of these is an empty tag? (a) <meta> (b) <li> (c) <ul> (d) <h1>
- 24.Which of these has a closing tag? (a) <br> (b) <meta> (c) <input> (d) <p>
-
25.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>The red kite</p> - 26.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
- 27.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
- 28.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h6> or <h1>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
- 29.🔗 What does HyperText mean? (a) text with links (b) very big text (c) secret text (d) text in colour
-
30.📋 What number does the browser show next to “Orange”?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Guava</li>
<li>Litchi</li>
<li>Orange</li>
<li>Banana</li>
</ol> -
31.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Our school trip</p>
<p>Our school trip</p>
<h2>I love mangoes.</h2> -
32.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>My best friend</h2>
<p>I love mangoes.</p> -
33.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>My pets</h2>
<h2>I love mangoes.</h2> -
34.🔍 One closing tag is missing. Which one?
<small>Hello, world!
<em>I love mangoes.</em>
<i>Cricket is fun.</i> (a) </strong> (b) </small> (c) </i> (d) </em> - 35.True or false: HTML on its own cannot make tables. (a) True (b) False
- 36.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
-
37.🔗 Which address opens when you click this link?
<a href="art.html">About us</a> (a) news.html (b) quiz.html (c) art.html (d) About us - 38.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
- 39.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
- 40.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
Answer key
- numbers
- 350
- 2
- Cricket is fun.
- My Hobbies
- </html>
- 3
- 1
- About us
- 2
- cake.jpg
- <h1>
- True
- Take the quiz
- <ul>
- True
- has a closing tag
- Rain today
- </u>
- in a new tab
- 350
- Space Facts
- <meta>
- <p>
- 2
- a line across the page
- <a href="about.html">
- <h1>
- text with links
- 5
- 2
- 2
- 1
- </small>
- False
- Yes
- art.html
- <img>
- opens it in a new tab
- to leave notes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids