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 keep a high score? (a) No (b) Yes
-
2.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p>
<p>Rain today</p> - 3.Which of these goes in the head? (a) <ul> (b) <h1> (c) <link rel="stylesheet"> (d) <table>
-
4.🔗 Which words do you click on?
<a href="news.html">Contact us</a> (a) Contact us (b) Visit the site (c) href (d) news.html -
5.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<p>My pets</p> -
6.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Mango</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Grapes</li>
</ul> - 7.🔍 Which is the odd one out? (a) shows pages from the web (b) is where we type code (c) shows line numbers (d) saves our .html files
- 8.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h2>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
- 9.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 10.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as 5 spaces (d) as one space
- 11.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
12.🔍 One closing tag is missing. Which one?
<h2>Hello, world!</h2>
<i>Rain today</i>
<b>The red kite (a) </h3> (b) </i> (c) </b> (d) </h2> -
13.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) Visit the site (b) href (c) Contact us (d) https://example.com -
14.🔗 Which words do you click on?
<a href="quiz.html">Take the quiz</a> (a) quiz.html (b) Take the quiz (c) Play games (d) href - 15.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 16.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
-
17.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> - 18.True or false: HTML on its own can add pictures to a page. (a) False (b) True
- 19.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <title> (d) <a>
-
20.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>My best friend</p>
<!-- <p>Good morning!</p> --> (a) Good morning! (b) I love mangoes. (c) My best friend -
21.🔍 One closing tag is missing. Which one?
<h3>Our school trip
<u>Cricket is fun.</u>
<i>I love mangoes.</i> (a) </u> (b) </i> (c) </em> (d) </h3> - 22.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
- 23.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <!DOCTYPE html> (c) <html> (d) <body>
- 24.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
-
25.🔗 Which words do you click on?
<a href="contact.html">School news</a> (a) contact.html (b) School news (c) Take the quiz (d) href - 26.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
27.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>The red kite</p> -->
<!-- <p>Good morning!</p> -->
<p>My pets</p> - 28.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h6>? (a) <h3> (b) <h6> (c) <h5> (d) <h2>
-
29.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Fun facts</p>
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> -
30.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<!-- <p>Good morning!</p> -->
<!-- <p>My pets</p> --> -
31.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>My pets</p> - 32.True or false: <li> lists steps in order. (a) False (b) True
-
33.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Space Facts (b) Planets (c) Mars is red. (d) body -
34.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="300"> -
35.📋 What number does the browser show next to “Litchi”?
<ol start="7">
<li>Jamun</li>
<li>Mango</li>
<li>Litchi</li>
</ol> - 36.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) alt (c) src (d) height
- 37.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
38.🔗 Where does this link open?
<a href="maths.html">About us</a> (a) in the same tab (b) in a new tab -
39.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) href (b) Contact us (c) contact.html (d) About us - 40.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table
Answer key
- No
- 2
- <link rel="stylesheet">
- Contact us
- 2
- 5
- shows pages from the web
- <h6>
- <ul>
- as one space
- No
- </b>
- Contact us
- Take the quiz
- a closing tag
- <ul>
- 350
- True
- <a>
- Good morning!
- </h3>
- href
- <!DOCTYPE html>
- Yes
- School news
- a closing tag
- 2
- <h2>
- 3
- 1
- 2
- False
- Planets
- 300
- 9
- alt
- Yes
- in the same tab
- About us
- a line across the page
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids