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.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) editor (d) element
- 2.True or false: a web browser shows pages from the web. (a) True (b) False
- 3.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) </strong> (c) <strong> (d) <strong/>
-
4.🔍 One closing tag is missing. Which one?
<p>My pets</p>
<em>Fun facts</em>
<i>I love mangoes. (a) </h1> (b) </i> (c) </em> (d) </p> - 5.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
6.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<!-- <p>My pets</p> --> -
7.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Fun facts</p>
<p>Fun facts</p>
<h2>Hello, world!</h2> - 8.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
- 9.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
- 10.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
- 11.True or false: <img> goes in the body. (a) True (b) False
-
12.📋 What number does the browser show next to “Grapes”?
<ol start="3">
<li>Mango</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Guava</li>
<li>Papaya</li>
</ol> -
13.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>My best friend</p>
<h2>My best friend</h2>
<h2>My best friend</h2> - 14.Which of these has a closing tag? (a) <ul> (b) <br> (c) <input> (d) <hr>
- 15.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) tags (d) pixels
- 16.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
17.🔍 One closing tag is missing. Which one?
<b>Good morning!</b>
<i>Fun facts
<strong>I love mangoes.</strong> (a) </i> (b) </b> (c) </strong> (d) </h3> -
18.🔍 Which line is missing its closing tag?
line 1: <h2>Cricket is fun.
line 2: <h3>Good morning!</h3>
line 3: <strong>I love mangoes.</strong> (a) line 2 (b) line 1 (c) line 3 -
19.🔗 Which address opens when you click this link?
<a href="art.html">Contact us</a> (a) art.html (b) Contact us (c) quiz.html (d) news.html - 20.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
- 21.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 22.True or false: HTML on its own cannot run a game loop. (a) False (b) True
- 23.True or false: <li> shows bullet points. (a) True (b) False
- 24.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) height (d) src
- 25.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
- 26.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 27.True or false: <b> is an empty tag. (a) False (b) True
-
28.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h3>My pets</h3>
<p>My pets</p> - 29.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 30.True or false: HTML on its own can show paragraphs. (a) False (b) True
- 31.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
-
32.🔗 Which address opens when you click this link?
<a href="art.html">School news</a> (a) quiz.html (b) news.html (c) art.html (d) School news - 33.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h3>? (a) <h6> (b) <h3> (c) <h2> (d) <h5>
-
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="400"> (a) fort.jpg (b) A tiger asleep (c) An old fort (d) width - 35.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
- 36.True or false: <ul> is an unordered list. (a) True (b) False
- 37.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
-
38.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Rain today</p> --> -
39.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets - 40.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
Answer key
- element
- True
- </strong>
- </i>
- in the body
- 1
- 3
- <a>
- 1
- a code editor
- True
- 4
- 2
- <ul>
- tags
- has a closing tag
- </i>
- line 1
- art.html
- opens it in a new tab
- an opening tag
- True
- False
- alt
- href
- No
- False
- 2
- Yes
- True
- an attribute
- art.html
- <h2>
- An old fort
- <h1>
- True
- on the browser tab
- 2
- bullets
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids