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 <p> make? (a) a paragraph (b) a link (c) a picture (d) a table
- 2.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 3.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
-
4.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<p>Fun facts</p> (a) Fun facts (b) Good morning! (c) Hello, world! (d) I love mangoes. -
5.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers - 6.🔗 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">
- 7.True or false: <img> goes in the head. (a) True (b) False
- 8.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 9.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 10.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h2>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
- 11.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the title (d) the doctype
- 12.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
- 13.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>
- 14.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
15.📋 What number does the browser show next to “Mango”?
<ol start="6">
<li>Banana</li>
<li>Jamun</li>
<li>Mango</li>
<li>Grapes</li>
<li>Orange</li>
<li>Papaya</li>
</ol> - 16.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 17.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
- 18.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) alt (c) src (d) width
-
19.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<p>My best friend</p>
<p>Rain today</p> - 20.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 21.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
-
22.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<p>My pets</p> - 23.True or false: a web server shows line numbers. (a) True (b) False
-
24.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Rain today</p>
<p>I love mangoes.</p>
<p>The red kite</p>
<p>My best friend</p> - 25.True or false: <title> has a closing tag. (a) True (b) False
-
26.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Rain today</p>
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> --> - 27.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h4>? (a) <h5> (b) <h4> (c) <h1> (d) <h6>
-
28.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>I love mangoes.</h2>
<p>I love mangoes.</p>
<p>Good morning!</p> - 29.Which of these is an opening tag? (a) </p> (b) </li> (c) </title> (d) <p>
- 30.True or false: <a> goes in the head. (a) False (b) True
- 31.True or false: <br> is an empty tag. (a) True (b) False
- 32.True or false: a web server opens web pages for us. (a) False (b) True
-
33.🔗 Where does this link open?
<a href="about.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
34.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>My best friend</h4>
<p>Our school trip</p> -
35.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>Our school trip</p> - 36.🏷️ Which is the closing tag for <small>? (a) <small> (b) <small/> (c) <\small> (d) </small>
- 37.True or false: <b> is an empty tag. (a) True (b) False
-
38.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Hello, world!</p>
<p>The red kite</p>
<p>Rain today</p>
<p>The red kite</p> -
39.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="250"> - 40.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
Answer key
- a paragraph
- has a closing tag
- <li>
- Good morning!
- numbers
- <a href="about.html">
- False
- an opening tag
- a closing tag
- <h2>
- the body
- False
- <img>
- a closing tag
- 8
- in the body
- starts a new line
- alt
- 1
- No
- <h1>
- 2
- False
- 5
- True
- 3
- <h6>
- 3
- <p>
- False
- True
- False
- in a new tab
- 2
- 3
- </small>
- False
- 1
- 250
- <!--
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids