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.🔗 Where does this link open?
<a href="quiz.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab -
2.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>Our school trip</h4>
<h2>I love mangoes.</h2> - 3.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
- 4.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
- 5.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
-
6.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My best friend</p>
<p>My pets</p>
<p>I love mangoes.</p>
<h3>Our school trip</h3> -
7.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Orange</li>
<li>Litchi</li>
<li>Jamun</li>
</ol> -
8.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Grapes</li>
</ul> (a) numbers (b) bullets - 9.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
- 10.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
11.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Rain today</p>
<!-- <p>My pets</p> -->
<p>Fun facts</p> - 12.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
-
13.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red<br>Stars shine</p> - 14.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <hr> (d) <br>
- 15.True or false: in <img>, src sets how tall it is. (a) False (b) True
-
16.🔗 Which address opens when you click this link?
<a href="art.html">Visit the site</a> (a) quiz.html (b) Visit the site (c) art.html (d) news.html - 17.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
- 18.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 19.💬 Does the browser show comments on the page? (a) Yes (b) No
- 20.🌍 Which program shows a web page to us? (a) a web browser (b) a calculator (c) a music player (d) a paint program
- 21.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
-
22.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<p>My best friend</p> - 23.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h1>? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
- 24.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as one space (c) as 5 spaces (d) as a dot
- 25.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) High Tech (c) HyperText (d) Hot Tags
-
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) Our school bus (b) An old fort (c) bus.jpg (d) width -
27.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>My pets</p>
<p>Hello, world!</p>
<!-- <p>Good morning!</p> --> - 28.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to load it faster (d) to make it bigger
- 29.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 30.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
-
31.📋 What number does the browser show next to “Banana”?
<ol start="9">
<li>Litchi</li>
<li>Banana</li>
<li>Mango</li>
<li>Grapes</li>
<li>Guava</li>
</ol> - 32.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h1>? (a) <h2> (b) <h1> (c) <h5> (d) <h3>
- 33.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
- 34.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
35.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Class 7 Blog (b) Here is my best one. (c) body (d) Match report - 36.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) width (d) src
- 37.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h5>? (a) <h3> (b) <h1> (c) <h5> (d) <h2>
-
38.🔗 Which address opens when you click this link?
<a href="art.html">Take the quiz</a> (a) Take the quiz (b) news.html (c) quiz.html (d) art.html -
39.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Hello, world!</p> -->
<p>Rain today</p> (a) My best friend (b) Hello, world! (c) Rain today - 40.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
Answer key
- in a new tab
- 3
- a paragraph
- <h6>
- to leave notes
- 2
- 4
- bullets
- 1
- has a closing tag
- 3
- a line across the page
- 3
- <ul>
- False
- art.html
- <img>
- an opening tag
- No
- a web browser
- <h1>
- 2
- <h1>
- as one space
- HyperText
- Our school bus
- 2
- to describe the image
- in the body
- 6
- 10
- <h5>
- <ol>
- an empty tag
- Match report
- src
- <h5>
- art.html
- Hello, world!
- in the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids