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 line is missing its closing tag?
line 1: <strong>Good morning!</strong>
line 2: <h3>My best friend
line 3: <p>Rain today</p> (a) line 2 (b) line 3 (c) line 1 - 2.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
- 3.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
- 4.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 5.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
- 6.Which of these is true of a web browser? (a) colours code to help us (b) sends pages over the net (c) shows pages from the web (d) saves our .html files
-
7.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) An old fort (b) width (c) bus.jpg (d) Our school bus - 8.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
9.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>My best friend</p>
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p> (a) Rain today (b) My best friend (c) Cricket is fun. (d) Our school trip - 10.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
-
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="50"> (a) Map of India (b) width (c) A red kite (d) kite.png - 12.Which of these is true of a web browser? (a) answers page requests (b) shows line numbers (c) has an address bar (d) is where we type code
- 13.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 14.💾 A web page file usually ends with which extension? (a) .txt (b) .mp3 (c) .html (d) .png
-
15.🔗 Where does this link open?
<a href="contact.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 16.📝 What does <p> make? (a) a paragraph (b) a link (c) a picture (d) a table
-
17.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip</strong>
line 2: <p>Cricket is fun.
line 3: <h1>Hello, world!</h1> (a) line 3 (b) line 2 (c) line 1 -
18.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="50"> - 19.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) height (d) alt
- 20.True or false: a web browser turns HTML into a page. (a) False (b) True
- 21.Which of these is a closing tag? (a) <title> (b) <b> (c) <li> (d) </p>
- 22.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
- 23.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
- 24.Which of these is true of a web server? (a) colours code to help us (b) opens web pages for us (c) has an address bar (d) sends pages over the net
-
25.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Guava</li>
<li>Grapes</li>
</ul> (a) bullets (b) numbers - 26.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the title (d) the body
- 27.Which of these is true of a web server? (a) stores a website’s files (b) colours code to help us (c) is where we type code (d) turns HTML into a page
- 28.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h5>
- 29.Which of these has a closing tag? (a) <title> (b) <br> (c) <img> (d) <meta>
- 30.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h1> or <h5>? (a) <h1> (b) <h4> (c) <h6> (d) <h5>
-
31.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) My drawings (b) body (c) Riya’s Recipes (d) Try this poha. - 32.True or false: <ul> shows bullet points. (a) False (b) True
-
33.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow<br>Sky is blue<br>Roses are red<br>Birds sing</p> -
34.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Good morning!</p>
<p>My best friend</p>
<p>Hello, world!</p> -
35.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="400"> -
36.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) Play games (b) href (c) Take the quiz (d) art.html -
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="50"> (a) Our school bus (b) moon.png (c) width (d) The full moon - 38.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 39.Which of these is an opening tag? (a) </body> (b) </b> (c) <h1> (d) </p>
-
40.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) School news (b) href (c) Art corner (d) https://example.com
Answer key
- line 2
- <a>
- <ol>
- -->
- <img>
- shows pages from the web
- Our school bus
- has a closing tag
- Our school trip
- on the browser tab
- A red kite
- has an address bar
- Yes
- .html
- in a new tab
- a paragraph
- line 2
- 50
- alt
- True
- </p>
- <ul>
- opens it in a new tab
- sends pages over the net
- bullets
- the body
- stores a website’s files
- <h1>
- <title>
- <h1>
- My drawings
- True
- 5
- 4
- 400
- Take the quiz
- The full moon
- Yes
- <h1>
- Art corner
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids