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.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<h2>Hello, world!</h2> -
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="350"> (a) width (b) A tiger asleep (c) fort.jpg (d) An old fort - 3.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
-
4.🔍 One closing tag is missing. Which one?
<h1>Cricket is fun.</h1>
<strong>Hello, world!</strong>
<u>Fun facts (a) </u> (b) </h3> (c) </strong> (d) </h1> - 5.True or false: a code editor hosts websites online. (a) False (b) True
-
6.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Good morning!</p>
<h2>Fun facts</h2>
<h2>Our school trip</h2>
<h2>My best friend</h2> -
7.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) index.html (b) Match report (c) Class 7 Blog (d) We won by 5 runs. - 8.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 9.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) height (d) width
-
10.🔍 Which line is missing its closing tag?
line 1: <h2>My pets</h2>
line 2: <h1>The red kite
line 3: <p>Hello, world!</p> (a) line 2 (b) line 1 (c) line 3 - 11.True or false: <title> goes in the head. (a) True (b) False
-
12.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) maths.html (b) https://example.com (c) About us (d) art.html -
13.🔗 Which address opens when you click this link?
<a href="news.html">Maths fun</a> (a) Maths fun (b) quiz.html (c) news.html (d) games.html - 14.🔢 In a basic web page file, which comes first: “</body>” or “<html>”? (a) <html> (b) </body>
-
15.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) Take the quiz (b) School news (c) games.html (d) href - 16.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
- 17.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 18.True or false: in <img>, src is read by screen readers. (a) True (b) False
-
19.🔗 Which address opens when you click this link?
<a href="games.html">School news</a> (a) games.html (b) contact.html (c) School news (d) about.html - 20.True or false: in <img>, height describes the picture. (a) False (b) True
-
21.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Guava</li>
</ol> (a) numbers (b) bullets -
22.🔗 Where does this link open?
<a href="art.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab - 23.🏷️ Which is the closing tag for <strong>? (a) </strong> (b) <\strong> (c) <strong/> (d) <strong>
-
24.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Guava</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> -
25.🔍 One closing tag is missing. Which one?
<p>My pets
<i>Fun facts</i>
<b>I love mangoes.</b> (a) </b> (b) </i> (c) </p> (d) </strong> - 26.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
- 27.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
- 28.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
-
29.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p> -
30.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> - 31.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 32.📄 Can HTML on its own make headings? (a) No (b) Yes
-
33.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) body (c) Welcome! (d) My Hobbies - 34.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) turns HTML into a page (d) answers page requests
- 35.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Mouse (c) Modern (d) Machine
- 36.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
-
37.🔍 One closing tag is missing. Which one?
<b>Cricket is fun.
<u>My best friend</u>
<h3>Fun facts</h3> (a) </b> (b) </u> (c) </h3> (d) </em> -
38.🔗 Which words do you click on?
<a href="quiz.html">Maths fun</a> (a) quiz.html (b) href (c) Art corner (d) Maths fun -
39.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Banana</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers - 40.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
Answer key
- 2
- An old fort
- alt
- </u>
- False
- 2
- Class 7 Blog
- in the head
- src
- line 2
- True
- https://example.com
- news.html
- <html>
- School news
- <ol>
- <ol>
- False
- games.html
- False
- numbers
- in a new tab
- </strong>
- 2
- </p>
- No
- a slash /
- href
- 1
- 150
- True
- Yes
- Welcome!
- answers page requests
- Markup
- <h6>
- </b>
- Maths fun
- numbers
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids