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 of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <table> (d) <style>
- 2.🏷️ Which is the closing tag for <b>? (a) </b> (b) <\b> (c) <b> (d) <b/>
-
3.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<p>Fun facts</p> - 4.🔢 In a basic web page file, which comes first: “<body>” or “</html>”? (a) </html> (b) <body>
- 5.Which of these has a closing tag? (a) <input> (b) <p> (c) <img> (d) <meta>
- 6.Which of these is an opening tag? (a) <h1> (b) </p> (c) </b> (d) </h1>
- 7.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
8.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 9.True or false: in <img>, height shows if the image fails. (a) True (b) False
- 10.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 11.Which of these has a closing tag? (a) <hr> (b) <br> (c) <title> (d) <meta>
-
12.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Cricket Club (b) Easy snacks (c) index.html (d) We won by 5 runs. - 13.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the doctype (d) the title
-
14.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Stars shine<br>Kites fly high</p> - 15.📝 What does <p> make? (a) a table (b) a picture (c) a paragraph (d) a link
- 16.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h6>? (a) <h3> (b) <h2> (c) <h6> (d) <h4>
- 17.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
18.🔗 Where does this link open?
<a href="art.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab - 19.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
20.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Papaya</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 21.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h3>? (a) <h3> (b) <h1> (c) <h4> (d) <h2>
- 22.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h4>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
-
23.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers - 24.True or false: <ul> is an unordered list. (a) False (b) True
-
25.🔗 Which words do you click on?
<a href="about.html">Visit the site</a> (a) about.html (b) Visit the site (c) href (d) Maths fun - 26.True or false: a web browser stores a website’s files. (a) False (b) True
-
27.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) width (b) cake.jpg (c) Birthday cake (d) A happy dog -
28.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets - 29.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) an element name (d) a comment
- 30.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
31.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>My best friend</h2>
<p>My pets</p>
<p>I love mangoes.</p>
<p>Fun facts</p> - 32.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <!DOCTYPE html> (c) </html> (d) <head>
- 33.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <li> (d) <ul>
-
34.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>My best friend</p>
<!-- <p>The red kite</p> --> (a) My best friend (b) Good morning! (c) The red kite -
35.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Good morning!</p>
<h2>My pets</h2>
<p>Our school trip</p>
<p>Fun facts</p> -
36.📋 What number does the browser show next to “Guava”?
<ol>
<li>Orange</li>
<li>Mango</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Guava</li>
</ol> - 37.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 38.True or false: a web browser turns HTML into a page. (a) True (b) False
- 39.Which of these is true of a web server? (a) shows line numbers (b) shows pages from the web (c) colours code to help us (d) sends pages over the net
-
40.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
Answer key
- <table>
- </b>
- 3
- <body>
- <p>
- <h1>
- Yes
- bullets
- False
- a closing tag
- <title>
- Cricket Club
- the body
- 4
- a paragraph
- <h2>
- an empty tag
- in a new tab
- Yes
- bullets
- <h1>
- <h1>
- numbers
- True
- Visit the site
- False
- Birthday cake
- bullets
- an attribute
- an empty tag
- 4
- </html>
- <li>
- The red kite
- 2
- 5
- has a closing tag
- True
- sends pages over the net
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids