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 is the closing tag for <h3>? (a) <\h3> (b) <h3/> (c) <h3> (d) </h3>
- 2.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 3.True or false: HTML on its own cannot keep a high score. (a) False (b) True
- 4.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
- 5.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small> (d) <small/>
- 6.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
- 7.True or false: HTML on its own cannot make a form. (a) True (b) False
- 8.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
-
9.🔗 Which address opens when you click this link?
<a href="news.html">School news</a> (a) quiz.html (b) news.html (c) games.html (d) School news -
10.🔗 Where does this link open?
<a href="https://example.com">Visit the site</a> (a) in a new tab (b) in the same tab - 11.🖼️ Which attribute of <img> tells which image to load? (a) src (b) height (c) alt (d) width
-
12.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) I love mangoes. (c) The red kite (d) Good morning! - 13.Which of these has a closing tag? (a) <h1> (b) <img> (c) <meta> (d) <input>
- 14.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
-
15.📋 What number does the browser show next to “Guava”?
<ol>
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
<li>Litchi</li>
<li>Orange</li>
</ol> - 16.Which of these is an opening tag? (a) </h1> (b) </p> (c) </body> (d) <title>
-
17.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) body (c) Space Facts (d) Welcome! - 18.Which of these is true of a web browser? (a) turns HTML into a page (b) is where we type code (c) saves our .html files (d) shows line numbers
-
19.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) Thanks for visiting. (c) Easy snacks (d) My Hobbies - 20.💬 How does an HTML comment end? (a) >> (b) --> (c) // (d) */
-
21.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Orange</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Grapes</li>
</ol> -
22.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h3>The red kite</h3>
<h2>Hello, world!</h2>
<p>Hello, world!</p> -
23.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="150"> -
24.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Birds sing</p> - 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 26.💬 Does the browser show comments on the page? (a) No (b) Yes
- 27.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h5>? (a) <h2> (b) <h5> (c) <h3> (d) <h6>
- 28.True or false: <ul> shows bullet points. (a) False (b) True
-
29.🔗 Which address opens when you click this link?
<a href="games.html">Maths fun</a> (a) Maths fun (b) about.html (c) games.html (d) contact.html -
30.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="200"> - 31.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
- 32.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
-
33.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Rain today</p>
<h2>My best friend</h2> - 34.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to describe the image (d) to make it bigger
- 35.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
- 36.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h3>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
-
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="200"> (a) width (b) A tiger asleep (c) fort.jpg (d) An old fort - 38.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
39.🔍 Which line is missing its closing tag?
line 1: <strong>Cricket is fun.</strong>
line 2: <u>Rain today</u>
line 3: <h3>I love mangoes. (a) line 2 (b) line 3 (c) line 1 - 40.📝 What does <p> make? (a) a picture (b) a table (c) a link (d) a paragraph
Answer key
- </h3>
- Yes
- True
- in the body
- </small>
- <ul>
- False
- a code editor
- news.html
- in the same tab
- src
- Good morning!
- <h1>
- 1
- 3
- <title>
- Welcome!
- turns HTML into a page
- Easy snacks
- -->
- 5
- 3
- 150
- 3
- Yes
- No
- <h6>
- True
- games.html
- 200
- opens it in a new tab
- No
- 2
- to describe the image
- an attribute
- <h1>
- An old fort
- an opening tag
- line 3
- a paragraph
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids