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.True or false: a web server shows line numbers. (a) False (b) True
- 2.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) height (c) alt (d) src
- 3.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
- 4.🔗 What does HyperText mean? (a) text in colour (b) text with links (c) very big text (d) secret text
- 5.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Mouse (d) Machine
- 6.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 7.Which of these is a closing tag? (a) <b> (b) <li> (c) <body> (d) </h1>
- 8.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
9.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p>
<p>The red kite</p> (a) Cricket is fun. (b) The red kite (c) Our school trip (d) Hello, world! - 10.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
- 11.True or false: <img> goes in the body. (a) True (b) False
-
12.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Space Facts (b) We won by 5 runs. (c) index.html (d) Easy snacks - 13.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 14.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 15.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
-
16.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Orange</li>
</ul> -
17.📋 What number does the browser show next to “Banana”?
<ol>
<li>Orange</li>
<li>Litchi</li>
<li>Banana</li>
<li>Jamun</li>
<li>Mango</li>
<li>Grapes</li>
</ol> -
18.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>My pets</p> -->
<!-- <p>Rain today</p> --> - 19.True or false: in <img>, width is read by screen readers. (a) True (b) False
- 20.True or false: <ul> goes in the body. (a) False (b) True
-
21.🔍 Which line is missing its closing tag?
line 1: <b>My pets
line 2: <strong>Rain today</strong>
line 3: <i>Hello, world!</i> (a) line 2 (b) line 3 (c) line 1 -
22.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h2>My pets</h2>
<h2>Cricket is fun.</h2>
<h2>Hello, world!</h2> - 23.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
-
24.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>My best friend</p>
<h2>Rain today</h2> - 25.📝 What does <p> make? (a) a paragraph (b) a table (c) a picture (d) a link
- 26.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h4>? (a) <h3> (b) <h5> (c) <h1> (d) <h4>
- 27.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h5> or <h1>? (a) <h1> (b) <h5> (c) <h3> (d) <h4>
- 28.Which of these is an opening tag? (a) </h1> (b) <body> (c) </b> (d) </body>
-
29.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Jamun</li>
<li>Guava</li>
<li>Banana</li>
<li>Mango</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> -
30.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Rivers flow<br>Birds sing<br>Stars shine</p> -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="350"> (a) The full moon (b) Our school bus (c) width (d) moon.png - 32.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
-
33.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) Play games (b) games.html (c) About us (d) href -
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) width (b) A happy dog (c) cake.jpg (d) Birthday cake - 35.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
- 36.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) width (d) alt
- 37.True or false: HTML on its own cannot make headings. (a) True (b) False
-
38.🔍 Which line is missing its closing tag?
line 1: <i>Our school trip</i>
line 2: <h1>Hello, world!
line 3: <u>Cricket is fun.</u> (a) line 2 (b) line 3 (c) line 1 - 39.Which of these goes in the head? (a) <img> (b) <h1> (c) <ul> (d) <meta charset="utf-8">
-
40.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Class 7 Blog (b) Match report (c) index.html (d) We won by 5 runs.
Answer key
- False
- height
- a code editor
- text with links
- Markup
- Yes
- </h1>
- has a closing tag
- Cricket is fun.
- a slash /
- True
- Space Facts
- a closing tag
- Yes
- <!DOCTYPE html>
- 4
- 3
- 1
- False
- True
- line 1
- 4
- <li>
- 2
- a paragraph
- <h5>
- <h5>
- <body>
- 5
- 5
- The full moon
- in the body
- Play games
- Birthday cake
- <li>
- alt
- False
- line 2
- <meta charset="utf-8">
- Class 7 Blog
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids