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 is the closing tag for <u>? (a) <u/> (b) </u> (c) <u> (d) <\u>
- 2.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) { (d) <
- 3.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <p> (d) <meta charset="utf-8">
- 4.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
5.🔍 One closing tag is missing. Which one?
<h3>Hello, world!
<h1>Fun facts</h1>
<u>Rain today</u> (a) </h3> (b) </u> (c) </small> (d) </h1> -
6.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="300"> - 7.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
- 8.True or false: <li> is an empty tag. (a) True (b) False
- 9.🌐 Which one answers page requests? (a) a code editor (b) a web browser (c) a web server
- 10.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h1>? (a) <h1> (b) <h2> (c) <h5> (d) <h4>
- 11.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
-
12.🔗 Which words do you click on?
<a href="contact.html">School news</a> (a) contact.html (b) School news (c) Take the quiz (d) href -
13.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Fun facts</p>
<p>My pets</p> - 14.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h5>? (a) <h5> (b) <h6> (c) <h2> (d) <h4>
-
15.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Fun facts</h2>
<h4>My best friend</h4>
<p>I love mangoes.</p> -
16.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Guava</li>
<li>Jamun</li>
</ol> - 17.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
-
18.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<!-- <p>Fun facts</p> --> -
19.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Easy snacks (b) Try this poha. (c) index.html (d) Space Facts -
20.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) href (b) https://example.com (c) School news (d) Art corner - 21.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows line numbers (c) opens web pages for us (d) has an address bar
- 22.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
- 23.Which of these is true of a code editor? (a) answers page requests (b) opens web pages for us (c) shows pages from the web (d) saves our .html files
- 24.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a comment (d) a closing tag
- 25.True or false: <li> is an unordered list. (a) True (b) False
- 26.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
- 27.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
-
28.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Fun facts</p>
<p>Cricket is fun.</p>
<p>Our school trip</p> - 29.True or false: a web browser has an address bar. (a) True (b) False
- 30.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes text bold (d) makes a list
-
31.🔗 Where does this link open?
<a href="about.html">Contact us</a> (a) in the same tab (b) in a new tab -
32.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p> -
33.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) maths.html (b) contact.html (c) https://example.com (d) School news - 34.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
-
35.🔗 Which words do you click on?
<a href="art.html">Art corner</a> (a) href (b) School news (c) art.html (d) Art corner -
36.🔗 Which words do you click on?
<a href="about.html">Visit the site</a> (a) about.html (b) Maths fun (c) Visit the site (d) href - 37.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
38.🔍 Which line is missing its closing tag?
line 1: <strong>The red kite
line 2: <h2>Hello, world!</h2>
line 3: <h1>My best friend</h1> (a) line 3 (b) line 1 (c) line 2 -
39.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) about.html (b) href (c) Take the quiz (d) Play games -
40.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) Welcome! (c) Class 7 Blog (d) index.html
Answer key
- </u>
- <
- <p>
- has a closing tag
- </h3>
- 300
- 1
- False
- a web server
- <h1>
- <!DOCTYPE html>
- School news
- 1
- <h2>
- 3
- 3
- on the browser tab
- 2
- Space Facts
- Art corner
- shows line numbers
- a code editor
- saves our .html files
- an attribute
- False
- <h1>
- a web browser
- 4
- True
- starts a new line
- in the same tab
- 4
- contact.html
- <li>
- Art corner
- Visit the site
- in the head
- line 1
- Take the quiz
- Class 7 Blog
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids