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 does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dot . (d) a dollar $
- 2.True or false: <li> goes inside ul or ol. (a) False (b) True
-
3.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Cricket Club (b) index.html (c) Planets (d) Thanks for visiting. -
4.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high<br>Roses are red</p> -
5.🔗 Where does this link open?
<a href="https://example.com" target="_blank">About us</a> (a) in a new tab (b) in the same tab -
6.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Banana</li>
</ul> -
7.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>My pets</p> -->
<p>The red kite</p> - 8.🔍 Which is the odd one out? (a) answers page requests (b) saves our .html files (c) stores a website’s files (d) sends pages over the net
- 9.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 10.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 11.🔍 Which is the odd one out? (a) sends pages over the net (b) stores a website’s files (c) answers page requests (d) opens web pages for us
- 12.True or false: in <img>, width shows if the image fails. (a) True (b) False
-
13.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Our school trip</p>
<p>Cricket is fun.</p> - 14.Which of these is a closing tag? (a) </h1> (b) <title> (c) <li> (d) <p>
-
15.🔍 One closing tag is missing. Which one?
<u>Fun facts
<b>Rain today</b>
<strong>The red kite</strong> (a) </h3> (b) </strong> (c) </u> (d) </b> - 16.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
-
17.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Banana</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> -
18.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing</p> - 19.True or false: HTML on its own can make a form. (a) True (b) False
- 20.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
- 21.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 22.🌐 Which one colours code to help us? (a) a code editor (b) a web server (c) a web browser
-
23.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>My pets</h2>
<p>The red kite</p> - 24.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1/> (c) <\h1> (d) <h1>
- 25.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h2>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
- 26.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
- 27.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
-
28.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>The red kite</p>
<p>My best friend</p> - 29.Which of these has a closing tag? (a) <img> (b) <p> (c) <hr> (d) <input>
- 30.True or false: <ul> lists things in any order. (a) False (b) True
-
31.🔗 Which address opens when you click this link?
<a href="about.html">Maths fun</a> (a) https://example.com (b) Maths fun (c) contact.html (d) about.html -
32.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue</p> - 33.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
-
34.🔗 Which address opens when you click this link?
<a href="art.html">Art corner</a> (a) art.html (b) Art corner (c) news.html (d) quiz.html - 35.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
- 36.Which of these is true of a web server? (a) turns HTML into a page (b) hosts websites online (c) saves our .html files (d) opens web pages for us
- 37.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
-
38.🔗 Which words do you click on?
<a href="art.html">Visit the site</a> (a) art.html (b) Visit the site (c) Maths fun (d) href -
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="50"> (a) A tiger asleep (b) width (c) fort.jpg (d) An old fort - 40.True or false: <title> goes in the head. (a) False (b) True
Answer key
- a slash /
- True
- Cricket Club
- 3
- in a new tab
- 2
- 1
- saves our .html files
- Yes
- No
- opens web pages for us
- False
- 1
- </h1>
- </u>
- in the body
- 5
- 2
- True
- a paragraph
- a closing tag
- a code editor
- 2
- </h1>
- <h1>
- opens it in a new tab
- <h6>
- 2
- <p>
- True
- about.html
- 2
- <ul>
- art.html
- <a>
- hosts websites online
- No
- Visit the site
- An old fort
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids