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 address opens when you click this link?
<a href="art.html">Take the quiz</a> (a) news.html (b) quiz.html (c) Take the quiz (d) art.html - 2.🔍 Which is the odd one out? (a) shows pages from the web (b) stores a website’s files (c) opens web pages for us (d) turns HTML into a page
-
3.🔗 Where does this link open?
<a href="games.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab - 4.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
- 5.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 6 (d) 3
- 6.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h1>? (a) <h2> (b) <h3> (c) <h1> (d) <h4>
-
7.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high</p> -
8.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) All about me (b) index.html (c) Art Gallery (d) I like to read. - 9.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
-
10.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Birds sing<br>Rivers flow<br>Kites fly high</p> - 11.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 12.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small> (c) <small/> (d) <\small>
- 13.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Mouse (c) Modern (d) Markup
- 14.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
-
15.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) map.png (b) kite.png (c) tiger.jpg (d) A tiger asleep -
16.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>I love mangoes.</p>
<h4>Cricket is fun.</h4> -
17.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Our school trip</p>
<h2>Fun facts</h2>
<p>Cricket is fun.</p>
<h2>Good morning!</h2> -
18.🔍 Which line is missing its closing tag?
line 1: <h2>Our school trip</h2>
line 2: <small>Good morning!</small>
line 3: <h1>Cricket is fun. (a) line 2 (b) line 3 (c) line 1 - 19.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
- 20.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
-
21.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> --> -
22.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Litchi</li>
<li>Jamun</li>
</ol> (a) numbers (b) bullets - 23.True or false: <h1> is an empty tag. (a) False (b) True
- 24.True or false: <a> goes in the head. (a) True (b) False
-
25.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>The red kite</h3>
<h3>Cricket is fun.</h3>
<p>Fun facts</p> - 26.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) alt (d) src
-
27.🔍 Which line is missing its closing tag?
line 1: <strong>Hello, world!</strong>
line 2: <b>My pets</b>
line 3: <em>Good morning! (a) line 2 (b) line 1 (c) line 3 - 28.True or false: in <img>, width describes the picture. (a) True (b) False
- 29.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
- 30.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h6>? (a) <h5> (b) <h6> (c) <h2> (d) <h3>
- 31.Which of these is an opening tag? (a) </b> (b) </body> (c) </h1> (d) <h1>
-
32.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>My best friend</h2>
<p>Fun facts</p>
<h2>Rain today</h2>
<p>Hello, world!</p> - 33.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
- 34.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 35.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
-
36.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Planets (b) We won by 5 runs. (c) Class 7 Blog (d) index.html -
37.🔗 Where does this link open?
<a href="maths.html" target="_blank">School news</a> (a) in the same tab (b) in a new tab - 38.True or false: <b> is an empty tag. (a) False (b) True
- 39.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
- 40.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <head> (c) </body> (d) <body>
Answer key
- art.html
- stores a website’s files
- in a new tab
- <!--
- 6
- <h1>
- 2
- Art Gallery
- <img>
- 5
- False
- </small>
- Markup
- <li>
- tiger.jpg
- 2
- 3
- line 3
- alt
- <!DOCTYPE html>
- 1
- numbers
- False
- False
- 3
- src
- line 3
- False
- <a>
- <h6>
- <h1>
- 3
- <h6>
- True
- <a href="about.html">
- Class 7 Blog
- in a new tab
- False
- in the body
- </html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids