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.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
- 2.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <p> (c) <h6> (d) <br>
-
3.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<p>Good morning!</p> - 4.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 5.True or false: HTML on its own can pick a random number. (a) False (b) True
-
6.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Jamun</li>
<li>Guava</li>
</ol> - 7.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h3>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
- 8.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 9.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 10.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
-
11.🔗 Which words do you click on?
<a href="about.html">Play games</a> (a) Play games (b) href (c) About us (d) about.html - 12.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a slash / (d) a dot .
- 13.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
-
14.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Rain today</h2>
<p>My pets</p> - 15.True or false: <li> has a closing tag. (a) True (b) False
-
16.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) https://example.com (b) School news (c) maths.html (d) contact.html - 17.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
18.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>My pets</p>
<p>Hello, world!</p> (a) My pets (b) Rain today (c) Hello, world! - 19.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
-
20.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>The red kite</p>
<p>Rain today</p>
<h3>My pets</h3> - 21.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
- 22.Which of these is an opening tag? (a) </p> (b) <li> (c) </body> (d) </li>
- 23.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
-
24.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Fun facts</p> -->
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<p>Hello, world!</p> - 25.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
-
26.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>My pets</h2>
<p>Fun facts</p>
<h4>Our school trip</h4>
<p>Good morning!</p> - 27.🌍 Which program shows a web page to us? (a) a paint program (b) a music player (c) a calculator (d) a web browser
-
28.🔗 Which words do you click on?
<a href="news.html">Take the quiz</a> (a) news.html (b) Take the quiz (c) Play games (d) href - 29.Which of these goes in the head? (a) <a> (b) <link rel="stylesheet"> (c) <table> (d) <h1>
- 30.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h6> (b) <h4> (c) <h3> (d) <h1>
- 31.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
- 32.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>
-
33.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>My pets</h4>
<h2>My pets</h2>
<p>Fun facts</p> -
34.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) href (b) Play games (c) Take the quiz (d) contact.html -
35.🔗 Where does this link open?
<a href="news.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab - 36.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Language (d) Link
- 37.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
-
38.🔗 Where does this link open?
<a href="art.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab -
39.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p> (a) Cricket is fun. (b) My best friend (c) The red kite (d) Hello, world! - 40.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h3>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
Answer key
- <!DOCTYPE html>
- <h1>
- 3
- has a closing tag
- False
- 3
- <h6>
- in the body
- Yes
- <ul>
- Play games
- a slash /
- href
- 2
- True
- contact.html
- No
- Rain today
- in the head
- 2
- a code editor
- <li>
- starts a new line
- 3
- <a>
- 3
- a web browser
- Take the quiz
- <link rel="stylesheet">
- <h1>
- as one space
- -->
- 3
- Take the quiz
- in a new tab
- Language
- Yes
- in a new tab
- My best friend
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids