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.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) pixels (d) keys
- 2.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
-
3.🔗 Where does this link open?
<a href="games.html">About us</a> (a) in the same tab (b) in a new tab -
4.🔗 Where does this link open?
<a href="https://example.com">Contact us</a> (a) in the same tab (b) in a new tab - 5.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <html> (c) <body> (d) <!DOCTYPE html>
-
6.🔗 Which address opens when you click this link?
<a href="quiz.html">Maths fun</a> (a) about.html (b) quiz.html (c) games.html (d) Maths fun - 7.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h6> (b) <h2> (c) <h4> (d) <h5>
- 8.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <pic> (d) <a>
- 9.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
-
10.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine<br>Birds sing<br>Sky is blue</p> -
11.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) Visit the site (b) href (c) Contact us (d) contact.html -
12.📋 What number does the browser show next to “Jamun”?
<ol start="6">
<li>Orange</li>
<li>Litchi</li>
<li>Mango</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> - 13.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
- 14.True or false: <ul> lists things in any order. (a) True (b) False
-
15.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Fun facts</h2>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2>
<h2>Fun facts</h2>
<p>Cricket is fun.</p> -
16.🔗 Which address opens when you click this link?
<a href="maths.html">Maths fun</a> (a) news.html (b) maths.html (c) art.html (d) Maths fun - 17.True or false: in <img>, height sets how tall it is. (a) False (b) True
- 18.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
- 19.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 20.🔢 In a basic web page file, which comes first: “<body>” or “</head>”? (a) </head> (b) <body>
- 21.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
-
22.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Stars shine<br>Birds sing<br>Rivers flow</p> -
23.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) Class 7 Blog (c) index.html (d) Welcome! - 24.True or false: <p> goes in the head. (a) True (b) False
- 25.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
- 26.🧱 HTML gives a web page its ___. (a) speed (b) sound (c) structure (d) colours
- 27.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
28.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) Birthday cake (b) width (c) Map of India (d) map.png -
29.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Grapes</li>
</ol> (a) numbers (b) bullets - 30.True or false: in <img>, height tells which image to load. (a) False (b) True
- 31.Which of these is true of a code editor? (a) opens web pages for us (b) is where we type code (c) has an address bar (d) turns HTML into a page
-
32.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="50"> (a) width (b) kite.png (c) A red kite (d) Map of India - 33.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
34.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My pets</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> --> (a) Our school trip (b) Fun facts (c) My pets (d) My best friend -
35.🔍 Which line is missing its closing tag?
line 1: <h3>Rain today</h3>
line 2: <u>Cricket is fun.</u>
line 3: <h2>I love mangoes. (a) line 3 (b) line 2 (c) line 1 -
36.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Our school trip</p>
<!-- <p>Rain today</p> --> (a) Rain today (b) Our school trip (c) Hello, world! -
37.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="250"> (a) bus.jpg (b) fort.jpg (c) The full moon (d) moon.png - 38.True or false: in <img>, width names the picture file. (a) False (b) True
-
39.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<!-- <p>Rain today</p> --> - 40.True or false: HTML on its own can add pictures to a page. (a) True (b) False
Answer key
- tags
- alt
- in the same tab
- in the same tab
- <!DOCTYPE html>
- quiz.html
- <h2>
- <img>
- True
- 4
- Contact us
- 9
- <h1>
- True
- 3
- maths.html
- True
- <li>
- an empty tag
- </head>
- <a href="about.html">
- 5
- Class 7 Blog
- False
- <!DOCTYPE html>
- structure
- a closing tag
- Map of India
- numbers
- False
- is where we type code
- A red kite
- No
- My best friend
- line 3
- Rain today
- moon.png
- False
- 2
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids