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.🏷️ Which is the closing tag for <i>? (a) </i> (b) <\i> (c) <i/> (d) <i>
- 2.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
3.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Fun facts</p> --> -
4.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Litchi</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers - 5.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h1>
- 6.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
- 7.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) colours code to help us (d) sends pages over the net
-
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="50"> (a) map.png (b) Map of India (c) Birthday cake (d) width -
9.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) width (b) cake.jpg (c) Birthday cake (d) A happy dog - 10.Which of these is a closing tag? (a) <li> (b) <title> (c) <h1> (d) </h1>
- 11.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
-
12.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Hello, world!</h2>
<h2>My best friend</h2>
<p>Hello, world!</p>
<p>Hello, world!</p> - 13.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #
- 14.True or false: <title> is an empty tag. (a) False (b) True
-
15.🔗 Which address opens when you click this link?
<a href="art.html">Maths fun</a> (a) news.html (b) Maths fun (c) quiz.html (d) art.html - 16.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Machine (d) Mouse
- 17.Which of these is a closing tag? (a) <b> (b) </li> (c) <h1> (d) <li>
- 18.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) alt (d) width
-
19.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>The red kite</p>
<h2>Hello, world!</h2>
<h2>I love mangoes.</h2> -
20.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p> -
21.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Rain today</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>My best friend</p> --> - 22.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) alt (d) height
-
23.🔗 Which words do you click on?
<a href="maths.html">About us</a> (a) About us (b) maths.html (c) href (d) Contact us - 24.Which of these has a closing tag? (a) <hr> (b) <b> (c) <img> (d) <meta>
- 25.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
- 26.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
- 27.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor
- 28.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
-
29.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>The red kite</h2>
<p>Our school trip</p> - 30.Which of these is an opening tag? (a) </h1> (b) </li> (c) </p> (d) <li>
- 31.True or false: in <img>, alt describes the picture. (a) True (b) False
-
32.🔗 Where does this link open?
<a href="news.html">Contact us</a> (a) in the same tab (b) in a new tab - 33.Which of these is an empty tag? (a) <p> (b) <li> (c) <br> (d) <b>
-
34.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) My drawings (b) I like to read. (c) Cricket Club (d) index.html -
35.🔗 Where does this link open?
<a href="contact.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab - 36.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h6> (b) <h2> (c) <h4> (d) <h1>
- 37.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h6> (b) <h5> (c) <h2> (d) <h1>
-
38.🔗 Which words do you click on?
<a href="contact.html">Art corner</a> (a) contact.html (b) Art corner (c) School news (d) href - 39.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <hr> (d) <ul>
-
40.🔗 Where does this link open?
<a href="art.html">Art corner</a> (a) in the same tab (b) in a new tab
Answer key
- </i>
- an opening tag
- 2
- bullets
- <h1>
- to leave notes
- sends pages over the net
- Map of India
- Birthday cake
- </h1>
- <a href="about.html">
- 3
- a slash /
- False
- art.html
- Markup
- </li>
- width
- 3
- 1
- 2
- src
- About us
- <b>
- False
- href
- a web browser
- <
- 2
- <li>
- True
- in the same tab
- <br>
- Cricket Club
- in a new tab
- <h1>
- <h1>
- Art corner
- <ol>
- in the same tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids