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.True or false: a web server colours code to help us. (a) False (b) True
-
2.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>I love mangoes.</p> --> -
3.📋 What number does the browser show next to “Guava”?
<ol start="3">
<li>Orange</li>
<li>Guava</li>
<li>Mango</li>
<li>Litchi</li>
<li>Jamun</li>
</ol> -
4.🔗 Which words do you click on?
<a href="https://example.com">Maths fun</a> (a) Maths fun (b) https://example.com (c) href (d) Art corner - 5.📄 Can HTML on its own pick a random number? (a) No (b) Yes
- 6.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
- 7.📄 Can HTML on its own make headings? (a) No (b) Yes
- 8.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
- 9.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 10.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) src (d) height
- 11.Which of these is true of a web server? (a) colours code to help us (b) sends pages over the net (c) turns HTML into a page (d) is where we type code
- 12.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
13.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Banana</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers -
14.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab -
15.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h4>Cricket is fun.</h4>
<h4>Good morning!</h4>
<h2>Cricket is fun.</h2> -
16.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p>
<p>My best friend</p> (a) Our school trip (b) My best friend (c) I love mangoes. - 17.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
- 18.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
- 19.Which of these is a closing tag? (a) <li> (b) <h1> (c) </b> (d) <title>
- 20.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
-
21.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>Cricket is fun.</p>
<p>Our school trip</p> - 22.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
-
23.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Good morning!</h2>
<p>Good morning!</p>
<h2>Good morning!</h2>
<p>Fun facts</p>
<h2>My best friend</h2> - 24.Which of these goes in the head? (a) <ul> (b) <table> (c) <meta charset="utf-8"> (d) <h1>
-
25.🔍 Which line is missing its closing tag?
line 1: <h3>Hello, world!
line 2: <h1>Good morning!</h1>
line 3: <i>My best friend</i> (a) line 2 (b) line 3 (c) line 1 -
26.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="100"> - 27.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
- 28.Which of these has a closing tag? (a) <input> (b) <p> (c) <img> (d) <br>
-
29.🔗 Which words do you click on?
<a href="maths.html">About us</a> (a) href (b) maths.html (c) About us (d) Contact us - 30.📝 What does <hr> draw? (a) a link (b) a table (c) a line across the page (d) a picture
-
31.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>The red kite</p>
<h2>My pets</h2>
<p>The red kite</p> -
32.🔗 Which address opens when you click this link?
<a href="games.html">Art corner</a> (a) contact.html (b) games.html (c) Art corner (d) about.html - 33.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) width (b) A tiger asleep (c) tiger.jpg (d) A red kite - 35.Which of these is an empty tag? (a) <b> (b) <p> (c) <li> (d) <input>
- 36.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
-
37.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) index.html (c) All about me (d) My Hobbies - 38.True or false: in <img>, alt describes the picture. (a) False (b) True
-
39.🔗 Where does this link open?
<a href="news.html">Visit the site</a> (a) in the same tab (b) in a new tab - 40.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
Answer key
- False
- 1
- 4
- Maths fun
- No
- False
- Yes
- <ul>
- has a closing tag
- alt
- sends pages over the net
- a closing tag
- bullets
- in a new tab
- 4
- I love mangoes.
- a web server
- <li>
- </b>
- <a href="about.html">
- 3
- a code editor
- 3
- <meta charset="utf-8">
- line 1
- 100
- <li>
- <p>
- About us
- a line across the page
- 2
- games.html
- has a closing tag
- A tiger asleep
- <input>
- <h6>
- My Hobbies
- True
- in the same tab
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids