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 of these is true of a web browser? (a) shows line numbers (b) turns HTML into a page (c) answers page requests (d) hosts websites online
- 2.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h2>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
-
3.🔗 Which words do you click on?
<a href="quiz.html">Play games</a> (a) About us (b) Play games (c) quiz.html (d) href - 4.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong> (c) <strong/> (d) </strong>
-
5.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Rivers flow<br>Sky is blue<br>Roses are red</p> - 6.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h3> or <h4>? (a) <h4> (b) <h1> (c) <h6> (d) <h3>
- 7.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <p> (d) <ul>
- 8.💾 A web page file usually ends with which extension? (a) .html (b) .png (c) .mp3 (d) .txt
- 9.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 10.🖼️ Which attribute of <img> describes the picture? (a) src (b) alt (c) height (d) width
- 11.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) <\i> (d) </i>
-
12.🔍 One closing tag is missing. Which one?
<i>Good morning!</i>
<h1>Fun facts
<p>The red kite</p> (a) </small> (b) </i> (c) </p> (d) </h1> - 13.True or false: <meta> has a closing tag. (a) True (b) False
- 14.📄 Can HTML on its own make a form? (a) No (b) Yes
-
15.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Art Gallery (b) Here is my best one. (c) Welcome! (d) body -
16.🔍 Which line is missing its closing tag?
line 1: <strong>My best friend
line 2: <b>Cricket is fun.</b>
line 3: <p>Hello, world!</p> (a) line 1 (b) line 2 (c) line 3 -
17.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>My best friend</p>
<h4>Cricket is fun.</h4>
<h2>Our school trip</h2> -
18.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>I love mangoes.</p>
<p>Hello, world!</p> - 19.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 20.True or false: <style> goes in the head. (a) False (b) True
-
21.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h3>Cricket is fun.</h3>
<h2>The red kite</h2>
<h4>Rain today</h4>
<h4>My best friend</h4> -
22.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) Contact us (b) https://example.com (c) maths.html (d) contact.html -
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) An old fort (b) bus.jpg (c) width (d) Our school bus - 24.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 25.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) { (d) <
- 26.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Home Text (c) Hot Tags (d) High Tech
- 27.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 28.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
- 29.Which of these is true of a web server? (a) stores a website’s files (b) colours code to help us (c) turns HTML into a page (d) opens web pages for us
-
30.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<!-- <p>Fun facts</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>The red kite</p> --> -
31.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<p>My best friend</p> (a) Good morning! (b) My best friend (c) Rain today - 32.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <a> (d) <p>
- 33.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
- 34.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <head> (c) <!DOCTYPE html> (d) </body>
- 35.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
36.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) A happy dog (b) The full moon (c) width (d) dog.jpg - 37.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 38.Which of these is true of a code editor? (a) turns HTML into a page (b) is where we type code (c) sends pages over the net (d) stores a website’s files
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg - 40.🔤 In “HTML”, what does the L stand for? (a) Line (b) Laptop (c) Language (d) Link
Answer key
- turns HTML into a page
- <h1>
- Play games
- </strong>
- 5
- <h6>
- <li>
- .html
- <ol>
- alt
- </i>
- </h1>
- False
- Yes
- Welcome!
- line 1
- 3
- 1
- No
- True
- 5
- contact.html
- Our school bus
- No
- <
- HyperText
- a closing tag
- a web browser
- stores a website’s files
- 1
- Rain today
- <img>
- <ul>
- <!DOCTYPE html>
- in the body
- A happy dog
- Yes
- is where we type code
- A tiger asleep
- Language
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids