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 picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) fort.jpg (b) bus.jpg (c) Our school bus (d) tiger.jpg - 2.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
-
3.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) kite.png (b) tiger.jpg (c) map.png (d) A tiger asleep -
4.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!</h2>
line 2: <h3>The red kite
line 3: <i>Our school trip</i> (a) line 1 (b) line 2 (c) line 3 - 5.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
- 6.Which of these is an opening tag? (a) </h1> (b) <b> (c) </p> (d) </title>
- 7.🏷️ Which is the closing tag for <em>? (a) </em> (b) <em> (c) <\em> (d) <em/>
- 8.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h2> or <h1>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
-
9.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high<br>Stars shine<br>Roses are red<br>Birds sing</p> -
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="400"> (a) width (b) An old fort (c) A tiger asleep (d) fort.jpg -
11.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Sky is blue<br>Stars shine<br>Kites fly high</p> -
12.📋 What number does the browser show next to “Jamun”?
<ol start="7">
<li>Banana</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Orange</li>
<li>Litchi</li>
</ol> - 13.🔍 Which is the odd one out? (a) opens web pages for us (b) stores a website’s files (c) turns HTML into a page (d) has an address bar
- 14.True or false: <ul> lists things in any order. (a) True (b) False
- 15.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 16.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h6> or <h5>? (a) <h6> (b) <h3> (c) <h1> (d) <h5>
- 17.Which of these is a closing tag? (a) <body> (b) </h1> (c) <li> (d) <b>
- 18.True or false: <p> goes in the body. (a) True (b) False
- 19.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
- 20.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
-
21.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Cricket Club (c) All about me (d) body -
22.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high<br>Sky is blue<br>Birds sing<br>Roses are red</p> - 23.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <\h1> (c) <h1> (d) <h1/>
- 24.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
- 25.Which of these goes in the body? (a) <title> (b) <img> (c) <link rel="stylesheet"> (d) <style>
-
26.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>The red kite</p>
<p>My pets</p>
<p>Fun facts</p>
<h2>Good morning!</h2> -
27.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) All about me (b) index.html (c) Class 7 Blog (d) Try this poha. - 28.True or false: <h1> has a closing tag. (a) True (b) False
-
29.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Guava</li>
<li>Papaya</li>
<li>Litchi</li>
</ul> -
30.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>My best friend</p>
<h2>Rain today</h2> - 31.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) opens web pages for us (d) saves our .html files
- 32.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
-
33.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Try this poha. (c) Welcome! (d) Art Gallery - 34.True or false: in <img>, width sets how tall it is. (a) True (b) False
- 35.💬 Does the browser show comments on the page? (a) Yes (b) No
-
36.🔗 Where does this link open?
<a href="contact.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab -
37.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip</strong>
line 2: <em>The red kite
line 3: <p>Cricket is fun.</p> (a) line 3 (b) line 2 (c) line 1 - 38.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 39.True or false: a web browser answers page requests. (a) True (b) False
-
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) Map of India (b) Birthday cake (c) map.png (d) width
Answer key
- bus.jpg
- <h6>
- tiger.jpg
- line 2
- alt
- <b>
- </em>
- <h1>
- 5
- An old fort
- 5
- 9
- stores a website’s files
- True
- True
- <h1>
- </h1>
- True
- a web browser
- -->
- All about me
- 5
- </h1>
- <a href="about.html">
- <img>
- 4
- Class 7 Blog
- True
- 4
- 2
- saves our .html files
- <li>
- Welcome!
- False
- No
- in a new tab
- line 2
- <ul>
- False
- Map of India
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids