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.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 2.True or false: <li> goes inside ul or ol. (a) True (b) False
- 3.Which of these is an opening tag? (a) </li> (b) </h1> (c) <li> (d) </title>
-
4.📋 What number does the browser show next to “Mango”?
<ol start="2">
<li>Guava</li>
<li>Mango</li>
<li>Banana</li>
<li>Grapes</li>
</ol> -
5.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>I love mangoes.</p>
<h2>My pets</h2>
<p>The red kite</p>
<h2>Our school trip</h2>
<p>Good morning!</p> - 6.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) an attribute (d) a closing tag
- 7.True or false: <table> goes in the body. (a) True (b) False
-
8.📋 What number does the browser show next to “Orange”?
<ol>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
</ol> -
9.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Mango</li>
<li>Jamun</li>
<li>Orange</li>
<li>Guava</li>
<li>Litchi</li>
</ul> -
10.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="250"> - 11.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
-
12.📋 What number does the browser show next to “Guava”?
<ol>
<li>Litchi</li>
<li>Mango</li>
<li>Guava</li>
</ol> - 13.Which of these has a closing tag? (a) <img> (b) <meta> (c) <input> (d) <ul>
- 14.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 15.True or false: a web browser opens web pages for us. (a) True (b) False
- 16.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
- 17.True or false: HTML on its own can count button clicks. (a) True (b) False
-
18.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>Our school trip</p> -
19.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) href (b) Visit the site (c) Contact us (d) games.html -
20.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> --> - 21.💬 Does the browser show comments on the page? (a) Yes (b) No
- 22.True or false: <ol> is one item of a list. (a) True (b) False
-
23.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.</h2>
<strong>Hello, world!</strong>
<h3>My best friend (a) </u> (b) </h3> (c) </strong> (d) </h2> - 24.True or false: <title> goes in the body. (a) True (b) False
-
25.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p> - 26.True or false: a code editor colours code to help us. (a) True (b) False
- 27.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 10 (d) 4
- 28.🔍 Which is the odd one out? (a) colours code to help us (b) opens web pages for us (c) has an address bar (d) turns HTML into a page
- 29.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h1> (d) <h2>
-
30.🔍 One closing tag is missing. Which one?
<h3>My best friend</h3>
<small>Rain today</small>
<b>Hello, world! (a) </small> (b) </h1> (c) </h3> (d) </b> - 31.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
- 32.True or false: <ul> goes in the body. (a) True (b) False
- 33.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h1> or <h2>? (a) <h2> (b) <h4> (c) <h6> (d) <h1>
- 34.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
- 35.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 36.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
- 37.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 38.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) src (c) alt (d) height
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="400"> (a) map.png (b) Birthday cake (c) width (d) Map of India - 40.🌍 Which program shows a web page to us? (a) a calculator (b) a paint program (c) a music player (d) a web browser
Answer key
- has a closing tag
- True
- <li>
- 3
- 4
- an attribute
- True
- 3
- 6
- 250
- opens it in a new tab
- 3
- <ul>
- in the head
- True
- href
- False
- 3
- Contact us
- 1
- No
- False
- </h3>
- False
- 3
- True
- 6
- colours code to help us
- <h1>
- </b>
- False
- True
- <h6>
- <!--
- Yes
- a code editor
- in the body
- height
- Map of India
- a web browser
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids