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.📋 What number does the browser show next to “Orange”?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Orange</li>
</ol> - 2.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
3.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) Match report (b) body (c) Try this poha. (d) Cricket Club - 4.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
-
5.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Our school trip</p>
<p>Cricket is fun.</p> -
6.🔗 Which address opens when you click this link?
<a href="games.html">Art corner</a> (a) Art corner (b) contact.html (c) games.html (d) about.html - 7.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
- 8.Which of these goes in the head? (a) <img> (b) <p> (c) <h1> (d) <title>
- 9.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h2>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
- 10.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
-
11.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>My pets</p> --> (a) I love mangoes. (b) Cricket is fun. (c) My pets (d) Good morning! - 12.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
- 13.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 14.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
- 15.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
-
16.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Rivers flow</p> - 17.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h1>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
- 18.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
-
19.🔍 One closing tag is missing. Which one?
<h1>My pets
<b>Rain today</b>
<i>The red kite</i> (a) </b> (b) </i> (c) </h1> (d) </small> -
20.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="200"> - 21.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
- 22.Which of these is true of a web browser? (a) answers page requests (b) stores a website’s files (c) opens web pages for us (d) saves our .html files
- 23.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
-
24.📋 What number does the browser show next to “Guava”?
<ol>
<li>Banana</li>
<li>Mango</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Guava</li>
</ol> -
25.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<p>I love mangoes.</p> (a) Good morning! (b) I love mangoes. (c) Rain today - 26.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 27.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) has an address bar (d) saves our .html files
- 28.Which of these is true of a code editor? (a) shows pages from the web (b) hosts websites online (c) has an address bar (d) shows line numbers
- 29.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h6>? (a) <h2> (b) <h4> (c) <h1> (d) <h6>
- 30.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
- 31.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
- 32.📄 Can HTML on its own run a game loop? (a) Yes (b) No
-
33.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Cricket is fun.</p>
<p>Our school trip</p>
<p>I love mangoes.</p> -
34.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Our school trip</p>
<h4>Rain today</h4>
<p>Our school trip</p>
<p>I love mangoes.</p> -
35.🔍 One closing tag is missing. Which one?
<strong>Hello, world!</strong>
<p>I love mangoes.
<h1>Our school trip</h1> (a) </h3> (b) </p> (c) </h1> (d) </strong> - 36.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
-
37.🔍 Which line is missing its closing tag?
line 1: <p>I love mangoes.</p>
line 2: <small>My pets</small>
line 3: <h1>Good morning! (a) line 3 (b) line 2 (c) line 1 - 38.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) src (c) width (d) height
-
39.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) Take the quiz (b) Play games (c) href (d) https://example.com -
40.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>Hello, world!</h2>
<p>I love mangoes.</p>
<h2>Good morning!</h2>
<h2>Fun facts</h2>
<p>Our school trip</p>
Answer key
- 3
- No
- Match report
- Yes
- 3
- games.html
- <a>
- <title>
- <h1>
- a web browser
- My pets
- to leave notes
- an empty tag
- a web browser
- in the head
- 3
- <h6>
- alt
- </h1>
- 200
- <h5>
- opens web pages for us
- <img>
- 5
- Rain today
- in the head
- has an address bar
- shows line numbers
- <h6>
- to describe the image
- 6
- No
- 1
- 2
- </p>
- a web browser
- line 3
- height
- Take the quiz
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids