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 text will NOT show on the page?
<p>My best friend</p>
<p>Rain today</p>
<!-- <p>Fun facts</p> -->
<p>Our school trip</p> (a) Rain today (b) Our school trip (c) Fun facts (d) My best friend - 2.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <h2> (c) <h2/> (d) <\h2>
- 3.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 4.True or false: in <img>, src tells which image to load. (a) False (b) True
- 5.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
- 6.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h2>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
- 7.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 8.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) < (d) {
- 9.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
10.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Our school trip</p>
<p>Our school trip</p>
<h2>Our school trip</h2>
<p>Good morning!</p>
<h2>I love mangoes.</h2> - 11.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h6>? (a) <h4> (b) <h5> (c) <h6> (d) <h3>
- 12.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h1>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
-
13.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p> - 14.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h4> or <h3>? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
- 15.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
16.🔗 Which address opens when you click this link?
<a href="about.html">Contact us</a> (a) contact.html (b) Contact us (c) about.html (d) https://example.com - 17.🖼️ Which attribute of <img> describes the picture? (a) src (b) width (c) height (d) alt
- 18.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
19.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) The full moon (b) A happy dog (c) dog.jpg (d) width - 20.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 21.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
- 22.💬 Does the browser show comments on the page? (a) No (b) Yes
-
23.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> --> - 24.Which of these goes in the head? (a) <style> (b) <h1> (c) <a> (d) <img>
- 25.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) <body>
- 26.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to add colour (d) to leave notes
- 27.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
- 28.True or false: <ul> shows bullet points. (a) False (b) True
-
29.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Guava</li>
<li>Orange</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Mango</li>
</ol> -
30.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Rain today</p>
<h2>Hello, world!</h2>
<h2>Cricket is fun.</h2>
<p>My best friend</p>
<h2>I love mangoes.</h2> - 31.🔍 Which is the odd one out? (a) colours code to help us (b) turns HTML into a page (c) shows line numbers (d) saves our .html files
- 32.Which of these is a closing tag? (a) <title> (b) <body> (c) </li> (d) <li>
- 33.True or false: in <img>, alt shows if the image fails. (a) True (b) False
-
34.🔍 One closing tag is missing. Which one?
<i>Cricket is fun.</i>
<h3>Rain today</h3>
<h2>My best friend (a) </h3> (b) </u> (c) </h2> (d) </i> -
35.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) dog.jpg (b) moon.png (c) bus.jpg (d) A happy dog -
36.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) body (b) Here is my best one. (c) All about me (d) Class 7 Blog - 37.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 38.Which of these is a closing tag? (a) <h1> (b) </h1> (c) <p> (d) <title>
-
39.🔍 Which line is missing its closing tag?
line 1: <h3>The red kite</h3>
line 2: <h1>Hello, world!</h1>
line 3: <strong>Good morning! (a) line 3 (b) line 2 (c) line 1 -
40.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers
Answer key
- Fun facts
- </h2>
- a closing tag
- True
- <a href="about.html">
- <h1>
- Yes
- <
- an empty tag
- 4
- <h3>
- <h1>
- 1
- <h4>
- an empty tag
- about.html
- alt
- has a closing tag
- A happy dog
- in the body
- False
- No
- 1
- <style>
- <!DOCTYPE html>
- to leave notes
- opens it in a new tab
- True
- 6
- 3
- turns HTML into a page
- </li>
- True
- </h2>
- dog.jpg
- All about me
- a closing tag
- </h1>
- line 3
- numbers
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids