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.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p> -
2.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Good morning!</p>
<p>My best friend</p>
<!-- <p>My pets</p> --> -
3.🔍 One closing tag is missing. Which one?
<h2>The red kite
<u>My best friend</u>
<h3>Rain today</h3> (a) </h2> (b) </h3> (c) </u> (d) </b> - 4.True or false: a web server saves our .html files. (a) True (b) False
-
5.🔗 Which address opens when you click this link?
<a href="contact.html">Art corner</a> (a) maths.html (b) https://example.com (c) contact.html (d) Art corner - 6.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
- 7.Which of these has a closing tag? (a) <br> (b) <b> (c) <hr> (d) <img>
-
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="300"> (a) width (b) kite.png (c) A red kite (d) Map of India - 9.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <li> (d) <ol>
- 10.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
-
11.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine</p> - 12.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) </strong> (d) <strong/>
- 13.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
- 14.True or false: in <img>, src names the picture file. (a) False (b) True
- 15.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
- 16.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </head> (c) <head> (d) </html>
- 17.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
- 18.True or false: <hr> has a closing tag. (a) False (b) True
-
19.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) href (b) contact.html (c) Maths fun (d) Visit the site - 20.True or false: <title> goes in the body. (a) False (b) True
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) width (b) kite.png (c) Map of India (d) A red kite - 22.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
- 23.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
-
24.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Banana</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets -
25.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>The red kite</p>
<p>Fun facts</p>
<p>Cricket is fun.</p> - 26.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h3>? (a) <h6> (b) <h5> (c) <h3> (d) <h4>
-
27.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> -->
<p>The red kite</p> - 28.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
29.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) art.html (b) href (c) About us (d) Play games - 30.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
-
31.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Guava</li>
<li>Jamun</li>
</ul> -
32.🔗 Which words do you click on?
<a href="contact.html">School news</a> (a) contact.html (b) Take the quiz (c) School news (d) href - 33.Which of these is an opening tag? (a) </p> (b) </body> (c) </b> (d) <b>
- 34.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 35.Which of these is true of a code editor? (a) opens web pages for us (b) stores a website’s files (c) is where we type code (d) hosts websites online
-
36.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<!-- <p>My best friend</p> -->
<p>Hello, world!</p>
<!-- <p>Our school trip</p> --> -
37.🔗 Where does this link open?
<a href="contact.html">School news</a> (a) in a new tab (b) in the same tab - 38.True or false: a web server shows pages from the web. (a) True (b) False
- 39.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <a> (d) <meta charset="utf-8">
- 40.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
Answer key
- 1
- 3
- </h2>
- False
- contact.html
- <a>
- <b>
- A red kite
- <li>
- -->
- 2
- </strong>
- <ol>
- True
- a web browser
- </html>
- opens it in a new tab
- False
- Visit the site
- False
- A red kite
- to leave notes
- a line across the page
- bullets
- 5
- <h3>
- 2
- has a closing tag
- Play games
- a paragraph
- 3
- School news
- <b>
- has a closing tag
- is where we type code
- 2
- in the same tab
- False
- <a>
- <ol>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids