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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) A red kite (b) width (c) tiger.jpg (d) A tiger asleep -
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) width (b) The full moon (c) A happy dog (d) dog.jpg - 3.🌐 Which one colours code to help us? (a) a code editor (b) a web server (c) a web browser
-
4.🔍 One closing tag is missing. Which one?
<h2>Rain today</h2>
<i>Hello, world!
<b>My pets</b> (a) </b> (b) </small> (c) </i> (d) </h2> -
5.📋 What number does the browser show next to “Guava”?
<ol start="6">
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Guava</li>
</ol> - 6.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h5>? (a) <h1> (b) <h3> (c) <h6> (d) <h5>
- 7.Which of these is an opening tag? (a) </b> (b) </h1> (c) <title> (d) </p>
-
8.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p> - 9.Which of these is true of a code editor? (a) sends pages over the net (b) has an address bar (c) opens web pages for us (d) saves our .html files
-
10.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) href (b) https://example.com (c) Visit the site (d) Contact us -
11.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="400"> (a) An old fort (b) kite.png (c) tiger.jpg (d) fort.jpg - 12.Which of these is a closing tag? (a) <p> (b) <body> (c) <li> (d) </title>
- 13.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
14.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Mars is red.</p>
</body>
</html> (a) Easy snacks (b) Space Facts (c) Mars is red. (d) index.html - 15.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) src (d) alt
-
16.🔍 One closing tag is missing. Which one?
<h2>Hello, world!
<p>My best friend</p>
<u>I love mangoes.</u> (a) </p> (b) </u> (c) </h2> (d) </h1> - 17.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <img> (d) <title>
- 18.📝 What does <p> make? (a) a paragraph (b) a table (c) a picture (d) a link
- 19.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 20.True or false: <input> is an empty tag. (a) False (b) True
- 21.True or false: <style> goes in the head. (a) False (b) True
- 22.Which of these is a closing tag? (a) </p> (b) <h1> (c) <p> (d) <body>
- 23.True or false: HTML on its own can make links to pages. (a) True (b) False
-
24.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Grapes</li>
<li>Orange</li>
<li>Banana</li>
<li>Guava</li>
</ol> - 25.💬 Does the browser show comments on the page? (a) No (b) Yes
-
26.🔗 Which words do you click on?
<a href="maths.html">About us</a> (a) href (b) Contact us (c) About us (d) maths.html -
27.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>The red kite</p> -->
<!-- <p>I love mangoes.</p> --> - 28.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 29.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
30.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) art.html (b) Maths fun (c) maths.html (d) https://example.com - 31.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
- 32.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
-
33.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>Rain today</p>
<p>My pets</p>
<p>Fun facts</p>
<h2>The red kite</h2> - 34.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
- 35.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
36.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Mango</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets - 37.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h3>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
- 38.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
- 39.Which of these is true of a code editor? (a) sends pages over the net (b) stores a website’s files (c) shows line numbers (d) answers page requests
- 40.Which of these has a closing tag? (a) <input> (b) <ul> (c) <img> (d) <hr>
Answer key
- A tiger asleep
- A happy dog
- a code editor
- </i>
- 10
- <h1>
- <title>
- 2
- saves our .html files
- Contact us
- fort.jpg
- </title>
- an opening tag
- Space Facts
- width
- </h2>
- <img>
- a paragraph
- in the head
- True
- True
- </p>
- True
- 5
- No
- About us
- 1
- No
- No
- https://example.com
- <a>
- opens it in a new tab
- 5
- <h6>
- a closing tag
- bullets
- <h1>
- <ol>
- shows line numbers
- <ul>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids