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.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 2.Which of these is an opening tag? (a) </title> (b) </li> (c) <title> (d) </b>
-
3.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Mango</li>
<li>Jamun</li>
</ol> - 4.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
-
5.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Grapes</li>
<li>Mango</li>
</ul> - 6.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
- 7.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 8.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
- 9.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
- 10.True or false: <b> has a closing tag. (a) True (b) False
- 11.🔍 Which is the odd one out? (a) colours code to help us (b) answers page requests (c) is where we type code (d) shows line numbers
- 12.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) width (d) src
- 13.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 14.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
- 15.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 16.True or false: a web browser saves our .html files. (a) False (b) True
-
17.🔍 One closing tag is missing. Which one?
<h1>Hello, world!</h1>
<small>Rain today</small>
<h3>My best friend (a) </h1> (b) </small> (c) </u> (d) </h3> -
18.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="350"> -
19.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<p>My best friend</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Hello, world! (c) I love mangoes. (d) My best friend -
20.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My pets</p>
<h2>Good morning!</h2>
<p>Cricket is fun.</p>
<h3>The red kite</h3> -
21.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Rain today</p>
<!-- <p>Fun facts</p> --> - 22.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) src (d) width
-
23.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>Here is my best one.</p>
</body>
</html> (a) My drawings (b) body (c) Here is my best one. (d) Space Facts - 24.Which of these is true of a web browser? (a) turns HTML into a page (b) answers page requests (c) shows line numbers (d) colours code to help us
- 25.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
- 26.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
-
27.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>Fun facts</p> - 28.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
- 29.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h6>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
-
30.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers - 31.True or false: in <img>, width shows if the image fails. (a) True (b) False
- 32.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
- 33.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) src (d) height
-
34.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p> (a) Fun facts (b) Cricket is fun. (c) Hello, world! - 35.🏷️ Which is the closing tag for <b>? (a) <b> (b) <b/> (c) <\b> (d) </b>
- 36.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 37.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 38.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
-
39.🔍 Which line is missing its closing tag?
line 1: <em>Our school trip
line 2: <u>My pets</u>
line 3: <p>Hello, world!</p> (a) line 1 (b) line 2 (c) line 3 - 40.True or false: <li> is an ordered list. (a) False (b) True
Answer key
- has a closing tag
- <title>
- 3
- <img>
- 3
- Yes
- Yes
- False
- <
- True
- answers page requests
- alt
- opens it in a new tab
- <ol>
- an opening tag
- False
- </h3>
- 350
- Hello, world!
- 3
- 1
- height
- My drawings
- turns HTML into a page
- <a>
- True
- 2
- <a href="about.html">
- <h6>
- bullets
- False
- a paragraph
- src
- Cricket is fun.
- </b>
- a closing tag
- an opening tag
- href
- line 1
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids