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 <br> do? (a) adds a picture (b) makes a list (c) makes text bold (d) starts a new line
-
2.🔍 One closing tag is missing. Which one?
<small>Rain today</small>
<i>Good morning!</i>
<strong>Cricket is fun. (a) </strong> (b) </u> (c) </i> (d) </small> - 3.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 4.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h6>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
-
5.🔗 Where does this link open?
<a href="about.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 6.True or false: <b> is an empty tag. (a) True (b) False
-
7.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> - 8.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h1>? (a) <h1> (b) <h6> (c) <h4> (d) <h2>
-
9.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h4>Our school trip</h4>
<h4>The red kite</h4> - 10.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 11.True or false: <ul> is an unordered list. (a) False (b) True
- 12.Which of these is an opening tag? (a) </h1> (b) </b> (c) </title> (d) <p>
- 13.🔢 In a basic web page file, which comes LAST? (a) </head> (b) <!DOCTYPE html> (c) </body> (d) </html>
-
14.🔗 Which address opens when you click this link?
<a href="games.html">School news</a> (a) School news (b) games.html (c) about.html (d) contact.html -
15.📋 What number does the browser show next to “Papaya”?
<ol start="3">
<li>Orange</li>
<li>Grapes</li>
<li>Banana</li>
<li>Guava</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> -
16.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) news.html (b) Maths fun (c) href (d) Visit the site - 17.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) </html> (b) <html>
-
18.🔗 Which address opens when you click this link?
<a href="maths.html">Take the quiz</a> (a) maths.html (b) Take the quiz (c) news.html (d) art.html - 19.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h5>? (a) <h4> (b) <h2> (c) <h6> (d) <h5>
-
20.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>My pets</p>
<p>Our school trip</p>
<p>Good morning!</p>
<p>My pets</p> -
21.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> --> - 22.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
-
23.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab - 24.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
-
25.🔗 Where does this link open?
<a href="maths.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab -
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) dog.jpg (b) width (c) A happy dog (d) The full moon -
27.🔍 One closing tag is missing. Which one?
<small>My pets
<h3>Our school trip</h3>
<h1>My best friend</h1> (a) </h2> (b) </h1> (c) </small> (d) </h3> - 28.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
-
29.🔍 One closing tag is missing. Which one?
<u>The red kite</u>
<h1>Cricket is fun.</h1>
<h3>I love mangoes. (a) </u> (b) </p> (c) </h1> (d) </h3> -
30.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<!-- <p>Good morning!</p> --> -
31.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Guava</li>
</ul> - 32.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
- 33.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) height (d) alt
- 34.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
- 35.Which of these is an opening tag? (a) </h1> (b) </title> (c) <b> (d) </li>
-
36.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="250"> (a) dog.jpg (b) The full moon (c) A happy dog (d) width - 37.💬 Does the browser show comments on the page? (a) Yes (b) No
- 38.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h2> (d) <h6>
- 39.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h2>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
- 40.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
Answer key
- starts a new line
- </strong>
- No
- <h2>
- in a new tab
- False
- 5
- <h1>
- 3
- an empty tag
- True
- <p>
- </html>
- games.html
- 8
- Visit the site
- <html>
- maths.html
- <h2>
- 6
- 1
- False
- in a new tab
- .html
- in a new tab
- A happy dog
- </small>
- <!DOCTYPE html>
- </h3>
- 1
- 2
- <img>
- alt
- <h1>
- <b>
- A happy dog
- No
- <h6>
- <h1>
- opens it in a new tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids