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.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
- 2.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a hash # (d) a dollar $
- 3.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <\h3> (c) </h3> (d) <h3>
- 4.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
5.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high</p> - 6.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
- 7.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 8.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor
- 9.💾 A web page file usually ends with which extension? (a) .txt (b) .png (c) .mp3 (d) .html
- 10.True or false: <input> is an empty tag. (a) False (b) True
- 11.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
- 12.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
-
13.📋 What number does the browser show next to “Banana”?
<ol>
<li>Grapes</li>
<li>Orange</li>
<li>Jamun</li>
<li>Guava</li>
<li>Banana</li>
<li>Litchi</li>
</ol> -
14.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Papaya</li>
<li>Jamun</li>
</ul> (a) bullets (b) numbers -
15.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Papaya</li>
</ol> -
16.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Fun facts</p>
<h2>Hello, world!</h2>
<p>Hello, world!</p>
<p>I love mangoes.</p> - 17.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
- 18.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the title (d) the doctype
-
19.📋 What number does the browser show next to “Papaya”?
<ol start="8">
<li>Banana</li>
<li>Orange</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Guava</li>
</ol> -
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) map.png (b) Map of India (c) Birthday cake (d) width - 21.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
- 22.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
-
23.🔗 Where does this link open?
<a href="contact.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab - 24.🔍 Which is the odd one out? (a) has an address bar (b) stores a website’s files (c) hosts websites online (d) answers page requests
- 25.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h1> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h5>
- 26.True or false: HTML on its own can pick a random number. (a) False (b) True
-
27.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>My pets</p> -->
<!-- <p>My best friend</p> -->
<p>Hello, world!</p> - 28.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
-
29.🔍 Which line is missing its closing tag?
line 1: <i>Cricket is fun.</i>
line 2: <h1>Hello, world!
line 3: <b>My pets</b> (a) line 2 (b) line 1 (c) line 3 - 30.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 31.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
- 32.True or false: <a> goes in the body. (a) False (b) True
- 33.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
- 34.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a dot (d) as a new line
-
35.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) contact.html (b) Take the quiz (c) Play games (d) href - 36.True or false: a web server shows pages from the web. (a) True (b) False
- 37.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h1>? (a) <h1> (b) <h5> (c) <h3> (d) <h4>
- 38.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
-
39.🔍 One closing tag is missing. Which one?
<h1>My best friend</h1>
<h2>Rain today
<u>Hello, world!</u> (a) </h2> (b) </u> (c) </h1> (d) </strong> -
40.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>My pets</p>
<p>Our school trip</p>
<h2>I love mangoes.</h2>
Answer key
- an attribute
- a slash /
- </h3>
- No
- 2
- <ol>
- No
- a web browser
- .html
- True
- 6
- starts a new line
- 5
- bullets
- 2
- 4
- <!--
- the body
- 10
- Map of India
- <img>
- <ol>
- in a new tab
- has an address bar
- <h6>
- False
- 1
- alt
- line 2
- a closing tag
- opens it in a new tab
- True
- a web browser
- as one space
- Take the quiz
- False
- <h1>
- <h5>
- </h2>
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids