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 number does the browser show next to “Papaya”?
<ol start="3">
<li>Guava</li>
<li>Papaya</li>
<li>Orange</li>
<li>Banana</li>
<li>Grapes</li>
</ol> -
2.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<p>Good morning!</p> (a) I love mangoes. (b) Hello, world! (c) Cricket is fun. (d) Good morning! -
3.🔗 Which address opens when you click this link?
<a href="https://example.com">School news</a> (a) https://example.com (b) School news (c) maths.html (d) art.html - 4.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the body (d) the head
- 5.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
-
6.📋 What number does the browser show next to “Orange”?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Jamun</li>
</ol> -
7.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets -
8.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>My pets</p>
<p>The red kite</p> -
9.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<p>Rain today</p> (a) My pets (b) Good morning! (c) Rain today (d) Our school trip - 10.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) an attribute (d) a comment
- 11.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
- 12.True or false: <a> goes in the head. (a) False (b) True
- 13.Which of these is an empty tag? (a) <input> (b) <li> (c) <title> (d) <p>
- 14.True or false: in <img>, alt describes the picture. (a) False (b) True
-
15.🔗 Which words do you click on?
<a href="quiz.html">Art corner</a> (a) quiz.html (b) School news (c) href (d) Art corner - 16.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <style> (d) <table>
- 17.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Machine (c) Modern (d) Markup
-
18.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Hello, world!</p>
<p>My pets</p> - 19.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h6>? (a) <h3> (b) <h6> (c) <h1> (d) <h5>
- 20.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 21.🏷️ Which is the closing tag for <small>? (a) <small> (b) <\small> (c) <small/> (d) </small>
-
22.🔗 Which address opens when you click this link?
<a href="games.html">Art corner</a> (a) contact.html (b) about.html (c) Art corner (d) games.html - 23.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 24.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes text bold (d) makes a list
- 25.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
- 26.🌐 Which one stores a website’s files? (a) a web server (b) a code editor (c) a web browser
- 27.Which of these has a closing tag? (a) <br> (b) <hr> (c) <meta> (d) <title>
- 28.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 29.True or false: <li> goes inside ul or ol. (a) False (b) True
- 30.🔍 Which is the odd one out? (a) shows pages from the web (b) colours code to help us (c) opens web pages for us (d) has an address bar
-
31.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> --> - 32.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 33.💬 How does an HTML comment end? (a) >> (b) --> (c) // (d) */
- 34.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h4> or <h3>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
- 35.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
36.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Banana</li>
</ol> - 37.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h1>
-
38.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Banana</li>
<li>Papaya</li>
<li>Orange</li>
</ul> -
39.🔍 Which line is missing its closing tag?
line 1: <small>My pets</small>
line 2: <h2>Fun facts
line 3: <h1>My best friend</h1> (a) line 3 (b) line 1 (c) line 2 - 40.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
Answer key
- 4
- Cricket is fun.
- https://example.com
- the body
- opens it in a new tab
- 2
- numbers
- 3
- My pets
- an attribute
- <!DOCTYPE html>
- False
- <input>
- True
- Art corner
- <table>
- Markup
- 3
- <h6>
- a closing tag
- </small>
- games.html
- an opening tag
- starts a new line
- <!--
- a web server
- <title>
- an opening tag
- True
- colours code to help us
- 2
- Yes
- -->
- <h4>
- a closing tag
- 2
- <h1>
- 4
- line 2
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids