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 does this code make?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>The red kite</p> - 2.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
- 3.📄 Can HTML on its own pick a random number? (a) Yes (b) No
- 4.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
- 5.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 6.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
-
7.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) index.html (b) Art Gallery (c) Welcome! (d) Mars is red. -
8.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Hello, world!</p> --> -
9.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="150"> (a) bus.jpg (b) The full moon (c) fort.jpg (d) moon.png - 10.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) shows pages from the web (d) colours code to help us
- 11.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 12.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 13.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
- 14.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
- 15.🔗 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
- 16.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
- 17.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
-
18.🔗 Which address opens when you click this link?
<a href="about.html">Art corner</a> (a) https://example.com (b) Art corner (c) contact.html (d) about.html - 19.True or false: <title> goes in the body. (a) True (b) False
- 20.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
- 21.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
- 22.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
23.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Our school trip</p>
<!-- <p>The red kite</p> --> -
24.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) tiger.jpg (b) A red kite (c) A tiger asleep (d) width - 25.Which of these is an opening tag? (a) </body> (b) <b> (c) </title> (d) </p>
- 26.True or false: <ol> goes inside ul or ol. (a) False (b) True
-
27.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>Our school trip</h4>
<h4>Hello, world!</h4>
<p>My best friend</p> -
28.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Orange</li>
<li>Jamun</li>
<li>Mango</li>
<li>Grapes</li>
</ol> - 29.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
- 30.True or false: <img> is an empty tag. (a) False (b) True
- 31.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h3>? (a) <h4> (b) <h6> (c) <h3> (d) <h2>
-
32.🔍 Which line is missing its closing tag?
line 1: <h3>Fun facts</h3>
line 2: <p>My pets</p>
line 3: <b>Our school trip (a) line 3 (b) line 1 (c) line 2 - 33.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h1>? (a) <h5> (b) <h3> (c) <h1> (d) <h6>
- 34.🏷️ Which is the closing tag for <u>? (a) <\u> (b) </u> (c) <u/> (d) <u>
- 35.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
-
36.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) A happy dog (b) bus.jpg (c) moon.png (d) dog.jpg - 37.🧱 HTML gives a web page its ___. (a) speed (b) sound (c) colours (d) structure
- 38.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
-
39.🔍 One closing tag is missing. Which one?
<h3>Cricket is fun.</h3>
<em>My best friend
<small>My pets</small> (a) </h3> (b) </small> (c) </h2> (d) </em> - 40.🏷️ HTML marks up text using ___. (a) pixels (b) wires (c) tags (d) keys
Answer key
- 3
- <ul>
- No
- <a href="about.html">
- has a closing tag
- <li>
- Art Gallery
- 2
- moon.png
- shows pages from the web
- Yes
- <ol>
- <a>
- the body
- opens it in a new tab
- on the browser tab
- <ol>
- about.html
- False
- a web browser
- element
- a closing tag
- 2
- A tiger asleep
- <b>
- False
- 3
- 5
- True
- True
- <h6>
- line 3
- <h1>
- </u>
- a slash /
- dog.jpg
- structure
- False
- </em>
- tags
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids