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 items does this list show?
<ul>
<li>Orange</li>
<li>Guava</li>
<li>Litchi</li>
</ul> -
2.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Try this poha. (c) My drawings (d) Art Gallery -
3.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) Maths fun (b) href (c) Art corner (d) art.html - 4.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
-
5.🔍 Which line is missing its closing tag?
line 1: <i>Good morning!</i>
line 2: <h3>My pets</h3>
line 3: <b>I love mangoes. (a) line 3 (b) line 1 (c) line 2 - 6.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
- 7.True or false: a code editor answers page requests. (a) False (b) True
-
8.🔍 Which line is missing its closing tag?
line 1: <p>Rain today</p>
line 2: <h1>Hello, world!
line 3: <h2>I love mangoes.</h2> (a) line 2 (b) line 3 (c) line 1 - 9.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h5>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
-
10.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="150"> -
11.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) games.html (b) Visit the site (c) Maths fun (d) href - 12.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 13.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 14.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
- 15.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) turns HTML into a page (d) hosts websites online
- 16.True or false: in <img>, alt is read by screen readers. (a) True (b) False
-
17.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Easy snacks (b) Try this poha. (c) Art Gallery (d) index.html - 18.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 19.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
- 20.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </html>
- 21.True or false: <ol> shows bullet points. (a) True (b) False
-
22.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<p>Hello, world!</p> - 23.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) height (d) src
-
24.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="100"> - 25.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
-
26.🔗 Which address opens when you click this link?
<a href="about.html">Art corner</a> (a) about.html (b) https://example.com (c) Art corner (d) contact.html - 27.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) answers page requests (d) has an address bar
- 28.Which of these goes in the head? (a) <p> (b) <ul> (c) <img> (d) <meta charset="utf-8">
-
29.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<p>I love mangoes.</p> (a) Cricket is fun. (b) I love mangoes. (c) Our school trip -
30.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Jamun</li>
<li>Banana</li>
</ul> - 31.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
- 32.True or false: in <img>, src names the picture file. (a) True (b) False
- 33.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
- 34.Which of these is an opening tag? (a) </h1> (b) <li> (c) </b> (d) </body>
- 35.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
- 36.Which of these is true of a code editor? (a) sends pages over the net (b) has an address bar (c) turns HTML into a page (d) is where we type code
- 37.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
-
38.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>My pets</h2>
<p>My best friend</p>
<h2>The red kite</h2>
<h2>Our school trip</h2> - 39.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 40.🖼️ Does <img> need a closing tag? (a) No (b) Yes
Answer key
- 3
- My drawings
- Maths fun
- <a>
- line 3
- href
- False
- line 2
- <h2>
- 150
- Visit the site
- Yes
- in the body
- <h1>
- hosts websites online
- True
- Art Gallery
- <ul>
- opens it in a new tab
- <!DOCTYPE html>
- False
- 2
- src
- 100
- <!DOCTYPE html>
- about.html
- has an address bar
- <meta charset="utf-8">
- Our school trip
- 3
- <h5>
- True
- a slash /
- <li>
- <ol>
- is where we type code
- <h2>
- 2
- True
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids