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.🔍 One closing tag is missing. Which one?
<p>Cricket is fun.</p>
<h1>Good morning!</h1>
<em>The red kite (a) </strong> (b) </h1> (c) </em> (d) </p> - 2.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1> (c) <\h1> (d) <h1/>
- 3.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
- 4.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
- 5.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) editor (d) element
- 6.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
7.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>The red kite</p>
<h2>Fun facts</h2>
<h3>Hello, world!</h3> - 8.True or false: <ul> lists steps in order. (a) True (b) False
- 9.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
- 10.True or false: <ul> shows bullet points. (a) False (b) True
- 11.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 12.True or false: HTML on its own can make bullet lists. (a) False (b) True
- 13.Which of these is an empty tag? (a) <p> (b) <hr> (c) <h1> (d) <ul>
- 14.Which of these goes in the head? (a) <h1> (b) <img> (c) <ul> (d) <link rel="stylesheet">
- 15.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
- 16.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 17.True or false: <h1> is an empty tag. (a) True (b) False
- 18.💾 A web page file usually ends with which extension? (a) .txt (b) .png (c) .html (d) .mp3
- 19.📄 Can HTML on its own make links to pages? (a) Yes (b) No
-
20.📋 What number does the browser show next to “Orange”?
<ol start="9">
<li>Guava</li>
<li>Orange</li>
<li>Jamun</li>
</ol> - 21.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h6> (d) <h3>
- 22.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
23.🔗 Which address opens when you click this link?
<a href="news.html">Art corner</a> (a) games.html (b) quiz.html (c) Art corner (d) news.html -
24.🔍 Which line is missing its closing tag?
line 1: <h2>The red kite</h2>
line 2: <em>Fun facts</em>
line 3: <i>Hello, world! (a) line 2 (b) line 1 (c) line 3 - 25.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 26.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
- 27.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
- 28.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
-
29.🔗 Where does this link open?
<a href="maths.html">Take the quiz</a> (a) in a new tab (b) in the same tab - 30.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
- 31.📝 What do we need to write HTML? (a) a plain text editor (b) a paintbrush (c) a printer (d) a microphone
-
32.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing</p> -
33.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="100"> (a) A tiger asleep (b) fort.jpg (c) width (d) An old fort - 34.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
-
35.🔍 One closing tag is missing. Which one?
<b>My best friend
<p>Fun facts</p>
<h3>Our school trip</h3> (a) </h3> (b) </p> (c) </strong> (d) </b> -
36.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>My pets</p>
<p>I love mangoes.</p>
<h3>I love mangoes.</h3>
<h2>I love mangoes.</h2> -
37.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) contact.html (b) https://example.com (c) School news (d) about.html - 38.True or false: in <img>, src is read by screen readers. (a) False (b) True
- 39.🌐 Which one shows pages from the web? (a) a web browser (b) a web server (c) a code editor
- 40.Which of these is an opening tag? (a) </body> (b) <h1> (c) </li> (d) </h1>
Answer key
- </em>
- </h1>
- the body
- href
- element
- in the body
- 3
- False
- Yes
- True
- in the head
- True
- <hr>
- <link rel="stylesheet">
- <ol>
- an empty tag
- False
- .html
- Yes
- 10
- <h6>
- has a closing tag
- news.html
- line 3
- an opening tag
- <h1>
- False
- <h5>
- in the same tab
- to leave notes
- a plain text editor
- 2
- An old fort
- 1
- </b>
- 3
- about.html
- False
- a web browser
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids