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 words do you click on?
<a href="art.html">About us</a> (a) art.html (b) Contact us (c) href (d) About us - 2.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
- 3.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
4.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Mango</li>
<li>Papaya</li>
</ol> -
5.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<p>My pets</p> (a) Cricket is fun. (b) Fun facts (c) Hello, world! (d) My pets - 6.True or false: a code editor opens web pages for us. (a) False (b) True
- 7.True or false: HTML on its own can count button clicks. (a) False (b) True
-
8.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>My best friend</p>
<p>I love mangoes.</p> - 9.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <li> (d) <ul>
- 10.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) nowhere (d) in a big heading
-
11.🔍 One closing tag is missing. Which one?
<small>Rain today</small>
<u>Cricket is fun.
<b>Our school trip</b> (a) </small> (b) </h2> (c) </b> (d) </u> - 12.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1/> (c) <\h1> (d) <h1>
- 13.True or false: HTML on its own can make tables. (a) False (b) True
- 14.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <img> (c) <h1> (d) <p>
- 15.True or false: in <img>, src names the picture file. (a) False (b) True
-
16.🔍 Which line is missing its closing tag?
line 1: <small>My pets</small>
line 2: <strong>I love mangoes.
line 3: <h3>The red kite</h3> (a) line 3 (b) line 2 (c) line 1 - 17.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <h1> (d) <link rel="stylesheet">
- 18.True or false: a web browser turns HTML into a page. (a) False (b) True
- 19.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it blank (d) makes it bold
-
20.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<p>My pets</p> (a) Fun facts (b) The red kite (c) My best friend (d) My pets -
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) My drawings (c) index.html (d) Class 7 Blog - 22.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
- 23.True or false: <ol> is one item of a list. (a) False (b) True
-
24.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>My best friend</p>
<!-- <p>Fun facts</p> -->
<p>Good morning!</p>
<p>Cricket is fun.</p> -
25.🔗 Where does this link open?
<a href="about.html" target="_blank">Maths fun</a> (a) in the same tab (b) in a new tab -
26.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<p>Fun facts</p> -
27.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> -->
<p>Good morning!</p> -
28.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>My pets</p>
<!-- <p>The red kite</p> --> (a) My best friend (b) The red kite (c) My pets - 29.True or false: <title> is an empty tag. (a) False (b) True
- 30.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <head> (b) <!DOCTYPE html>
- 31.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
32.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>My pets</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) Good morning! (c) My pets (d) Cricket is fun. -
33.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) Birthday cake (b) width (c) A happy dog (d) cake.jpg - 34.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to add colour (d) to make links
- 35.🔍 Which is the odd one out? (a) sends pages over the net (b) is where we type code (c) stores a website’s files (d) answers page requests
- 36.🏷️ Which is the closing tag for <p>? (a) </p> (b) <p/> (c) <p> (d) <\p>
-
37.🔗 Which words do you click on?
<a href="maths.html">Visit the site</a> (a) href (b) Visit the site (c) Maths fun (d) maths.html -
38.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Mango</li>
</ol> -
39.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Jamun</li>
</ul> (a) bullets (b) numbers -
40.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Fun facts</p> -->
<p>My best friend</p> (a) Fun facts (b) Our school trip (c) My best friend
Answer key
- About us
- <h5>
- in the head
- 3
- Hello, world!
- False
- False
- 3
- <li>
- on the browser tab
- </u>
- </h1>
- True
- <meta charset="utf-8">
- True
- line 2
- <h1>
- True
- opens it in a new tab
- My best friend
- Class 7 Blog
- a code editor
- False
- 4
- in a new tab
- 2
- 2
- The red kite
- False
- <!DOCTYPE html>
- an opening tag
- Good morning!
- Birthday cake
- to leave notes
- is where we type code
- </p>
- Visit the site
- 4
- bullets
- Fun facts
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids