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 list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
- 2.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Link (c) Line (d) Language
-
3.🔍 One closing tag is missing. Which one?
<p>I love mangoes.</p>
<small>My best friend
<b>Good morning!</b> (a) </p> (b) </u> (c) </b> (d) </small> - 4.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as 5 spaces (d) as one space
-
5.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) My Hobbies (b) I like to read. (c) Easy snacks (d) index.html - 6.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h4> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h6>
-
7.🔍 One closing tag is missing. Which one?
<h2>Our school trip</h2>
<h3>Fun facts
<h1>Rain today</h1> (a) </h1> (b) </p> (c) </h3> (d) </h2> - 8.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
9.🔗 Which words do you click on?
<a href="art.html">Contact us</a> (a) href (b) Visit the site (c) Contact us (d) art.html -
10.🔗 Which address opens when you click this link?
<a href="news.html">Art corner</a> (a) games.html (b) Art corner (c) quiz.html (d) news.html -
11.🔍 Which line is missing its closing tag?
line 1: <h1>Hello, world!</h1>
line 2: <em>My best friend
line 3: <strong>I love mangoes.</strong> (a) line 3 (b) line 2 (c) line 1 - 12.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h5> or <h4>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
- 13.True or false: a web server shows line numbers. (a) True (b) False
-
14.🔍 Which line is missing its closing tag?
line 1: <h1>Rain today</h1>
line 2: <u>Cricket is fun.
line 3: <p>Good morning!</p> (a) line 1 (b) line 2 (c) line 3 -
15.🔍 Which line is missing its closing tag?
line 1: <p>The red kite</p>
line 2: <small>My pets
line 3: <i>Rain today</i> (a) line 1 (b) line 2 (c) line 3 - 16.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a href="about.html">
- 17.True or false: <title> is an empty tag. (a) True (b) False
- 18.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
- 19.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
- 20.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster
-
21.🔍 Which line is missing its closing tag?
line 1: <strong>Rain today</strong>
line 2: <em>My pets</em>
line 3: <h3>Good morning! (a) line 2 (b) line 3 (c) line 1 -
22.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> --> - 23.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
-
24.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>Rain today</h2>
<p>Cricket is fun.</p>
<h3>Our school trip</h3>
<h3>Good morning!</h3> -
25.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<h2>Fun facts</h2> - 26.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) height (d) src
- 27.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 28.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes text bold (d) makes a list
-
29.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) My drawings (b) Class 7 Blog (c) I like to read. (d) body -
30.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Birds sing<br>Rivers flow<br>Roses are red</p> -
31.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Fun facts</p>
<h4>My best friend</h4>
<h4>My best friend</h4> - 32.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 33.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h4>? (a) <h5> (b) <h4> (c) <h2> (d) <h1>
-
34.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>My best friend</p> --> (a) My best friend (b) I love mangoes. (c) Good morning! (d) The red kite -
35.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<h2>Our school trip</h2> -
36.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<p>Our school trip</p> (a) Rain today (b) Our school trip (c) Good morning! - 37.Which of these is true of a code editor? (a) has an address bar (b) shows line numbers (c) answers page requests (d) opens web pages for us
-
38.🔗 Where does this link open?
<a href="news.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
39.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Good morning!</h2>
<p>Cricket is fun.</p>
<p>Fun facts</p>
<p>Our school trip</p>
<p>My pets</p> - 40.True or false: in <img>, height is read by screen readers. (a) True (b) False
Answer key
- <ul>
- Language
- </small>
- as one space
- My Hobbies
- <h6>
- </h3>
- a closing tag
- Contact us
- news.html
- line 2
- <h1>
- False
- line 2
- line 2
- <a href="about.html">
- False
- a web browser
- a code editor
- to describe the image
- line 3
- 3
- <ol>
- 4
- 2
- src
- a closing tag
- starts a new line
- My drawings
- 5
- 3
- an opening tag
- <h1>
- My best friend
- 2
- Rain today
- shows line numbers
- in a new tab
- 5
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids