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.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Hello, world!</h2>
<p>I love mangoes.</p>
<p>I love mangoes.</p> - 2.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
3.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>I love mangoes.</p>
<p>My best friend</p>
<p>Fun facts</p>
<p>My pets</p> - 4.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) has an address bar (d) shows line numbers
-
5.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p>
<!-- <p>The red kite</p> --> - 6.🌍 Which program shows a web page to us? (a) a calculator (b) a music player (c) a web browser (d) a paint program
-
7.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) href (b) games.html (c) Visit the site (d) Maths fun - 8.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 9.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h5>? (a) <h5> (b) <h3> (c) <h1> (d) <h4>
- 10.True or false: <li> shows bullet points. (a) True (b) False
-
11.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) A happy dog (b) moon.png (c) bus.jpg (d) dog.jpg - 12.Which of these is a closing tag? (a) <title> (b) <h1> (c) <p> (d) </h1>
-
13.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing</p> -
14.🔗 Which words do you click on?
<a href="about.html">Art corner</a> (a) about.html (b) href (c) Art corner (d) School news -
15.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Fun facts</p>
<h2>The red kite</h2>
<h2>I love mangoes.</h2>
<h2>Hello, world!</h2>
<h2>Hello, world!</h2> -
16.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>The red kite</p> - 17.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
- 18.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h4>? (a) <h6> (b) <h1> (c) <h5> (d) <h4>
-
19.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Hello, world!</p>
<p>Our school trip</p>
<p>I love mangoes.</p> -
20.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> --> - 21.True or false: <li> is an empty tag. (a) False (b) True
-
22.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>Good morning!</h2>
<p>My pets</p>
<p>Our school trip</p> -
23.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) body (c) Easy snacks (d) Art Gallery -
24.🔗 Where does this link open?
<a href="games.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab - 25.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <a> (d) <p>
- 26.True or false: <ul> is an unordered list. (a) True (b) False
- 27.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h5>
- 28.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
-
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) width (b) An old fort (c) bus.jpg (d) Our school bus - 30.True or false: <ul> has a closing tag. (a) True (b) False
- 31.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small/> (c) <small> (d) <\small>
- 32.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </html> (c) </body> (d) <!DOCTYPE html>
-
33.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>Good morning!</h2>
<p>Hello, world!</p>
<p>Our school trip</p>
<p>Rain today</p> -
34.🔍 Which line is missing its closing tag?
line 1: <h3>Cricket is fun.</h3>
line 2: <em>My pets</em>
line 3: <strong>Rain today (a) line 2 (b) line 3 (c) line 1 - 35.📄 Can HTML on its own make tables? (a) Yes (b) No
-
36.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) body (c) Planets (d) Cricket Club - 37.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
38.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Fun facts</h2>
<h2>Hello, world!</h2>
<p>My best friend</p>
<p>Fun facts</p>
<p>My best friend</p> -
39.🔍 One closing tag is missing. Which one?
<h2>My pets
<b>I love mangoes.</b>
<strong>Hello, world!</strong> (a) </b> (b) </h2> (c) </strong> (d) </i> - 40.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name
Answer key
- 3
- Yes
- 1
- has an address bar
- 1
- a web browser
- Visit the site
- No
- <h1>
- False
- dog.jpg
- </h1>
- 2
- Art corner
- 2
- 4
- href
- <h6>
- 1
- 3
- False
- 3
- Easy snacks
- in a new tab
- <img>
- True
- <h1>
- <li>
- Our school bus
- True
- </small>
- </html>
- 2
- line 3
- Yes
- Planets
- an opening tag
- 4
- </h2>
- an attribute
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids