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.📝 What does <br> do? (a) makes a list (b) makes text bold (c) adds a picture (d) starts a new line
-
2.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<h2>My best friend</h2>
<p>Rain today</p> -
3.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p> (a) My best friend (b) I love mangoes. (c) The red kite -
4.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p>
<!-- <p>My best friend</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>Cricket is fun.</p> --> - 5.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 6.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
-
7.🔗 Which address opens when you click this link?
<a href="contact.html">Art corner</a> (a) Art corner (b) maths.html (c) contact.html (d) https://example.com -
8.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) About us (b) href (c) quiz.html (d) Contact us - 9.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 10.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
- 11.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) </h1> (d) <h1>
- 12.🌐 Which one answers page requests? (a) a web server (b) a web browser (c) a code editor
- 13.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
-
14.🔍 Which line is missing its closing tag?
line 1: <strong>Rain today</strong>
line 2: <small>My pets
line 3: <h1>Good morning!</h1> (a) line 2 (b) line 3 (c) line 1 -
15.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Good morning!</p> -->
<!-- <p>My best friend</p> --> - 16.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
17.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) Play games (b) about.html (c) Take the quiz (d) href -
18.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Litchi</li>
</ul> -
19.🔍 One closing tag is missing. Which one?
<u>Rain today</u>
<h2>Fun facts
<p>Hello, world!</p> (a) </h2> (b) </u> (c) </p> (d) </h1> - 20.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 21.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) pixels (d) keys
-
22.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) A happy dog (b) Birthday cake (c) width (d) cake.jpg - 23.💬 Does the browser show comments on the page? (a) No (b) Yes
-
24.🔍 Which line is missing its closing tag?
line 1: <small>Our school trip</small>
line 2: <strong>Good morning!
line 3: <h1>Rain today</h1> (a) line 2 (b) line 3 (c) line 1 - 25.🔗 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">
- 26.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
- 27.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 28.True or false: <ol> lists steps in order. (a) True (b) False
-
29.🔍 One closing tag is missing. Which one?
<b>Our school trip</b>
<small>My pets
<em>Cricket is fun.</em> (a) </b> (b) </small> (c) </i> (d) </em> - 30.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
-
31.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> - 32.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
-
33.📄 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) Class 7 Blog (b) index.html (c) We won by 5 runs. (d) Welcome! -
34.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Banana</li>
</ul> - 35.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 36.Which of these is a closing tag? (a) <p> (b) <body> (c) </li> (d) <h1>
-
37.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Litchi</li>
</ol> - 38.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) element (d) attribute
- 39.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) is where we type code (d) hosts websites online
- 40.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
Answer key
- starts a new line
- 3
- I love mangoes.
- 1
- False
- <h1>
- contact.html
- About us
- No
- href
- </h1>
- a web server
- <ol>
- line 2
- 1
- has a closing tag
- Take the quiz
- 2
- </h2>
- Yes
- tags
- Birthday cake
- No
- line 2
- <a href="about.html">
- <li>
- a closing tag
- True
- </small>
- 1
- 200
- <!DOCTYPE html>
- Class 7 Blog
- 2
- No
- </li>
- 3
- element
- is where we type code
- in the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids