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 the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) Riya’s Recipes (b) Welcome! (c) index.html (d) I like to read. - 2.Which of these is an opening tag? (a) <li> (b) </p> (c) </b> (d) </h1>
-
3.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Fun facts</p>
<!-- <p>Good morning!</p> --> - 4.Which of these is a closing tag? (a) <title> (b) <body> (c) </h1> (d) <b>
- 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
-
6.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Good morning!</h2>
<p>Our school trip</p>
<p>Fun facts</p>
<p>I love mangoes.</p> - 7.🔍 Which is the odd one out? (a) hosts websites online (b) answers page requests (c) stores a website’s files (d) saves our .html files
- 8.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h2> or <h5>? (a) <h4> (b) <h5> (c) <h6> (d) <h2>
- 9.True or false: HTML on its own can make links to pages. (a) True (b) False
-
10.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="50"> - 11.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h3>? (a) <h4> (b) <h3> (c) <h1> (d) <h2>
-
12.🔗 Which words do you click on?
<a href="games.html">Maths fun</a> (a) games.html (b) href (c) Art corner (d) Maths fun - 13.Which of these is true of a code editor? (a) answers page requests (b) shows pages from the web (c) opens web pages for us (d) is where we type code
- 14.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 15.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <h1> (c) <style> (d) <title>
- 16.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a src="about.html"> (d) <a alt="about.html">
-
17.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> --> - 18.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h5>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
- 19.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
-
20.🔗 Where does this link open?
<a href="about.html">Take the quiz</a> (a) in a new tab (b) in the same tab - 21.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
22.🔍 One closing tag is missing. Which one?
<i>Hello, world!
<b>My best friend</b>
<h2>Cricket is fun.</h2> (a) </b> (b) </u> (c) </h2> (d) </i> - 23.True or false: <ul> has a closing tag. (a) False (b) True
- 24.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
- 25.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 26.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
27.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<!-- <p>My pets</p> --> - 28.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
-
29.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Grapes</li>
<li>Litchi</li>
</ol> (a) numbers (b) bullets - 30.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 31.Which of these is a closing tag? (a) <body> (b) <p> (c) <b> (d) </li>
-
32.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>Fun facts</h2>
<h3>Rain today</h3>
<h2>Fun facts</h2> - 33.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
- 34.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) keys (d) pixels
- 35.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
-
36.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) About us (b) href (c) Contact us (d) art.html - 37.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
-
38.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>Good morning!</h2>
<h2>My pets</h2>
<h2>Cricket is fun.</h2>
<h4>Fun facts</h4> - 39.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
- 40.True or false: <title> goes in the head. (a) False (b) True
Answer key
- Riya’s Recipes
- <li>
- 1
- </h1>
- opens it in a new tab
- 4
- saves our .html files
- <h6>
- True
- 50
- <h1>
- Maths fun
- is where we type code
- Yes
- <h1>
- <a href="about.html">
- 2
- <h6>
- <img>
- in the same tab
- a closing tag
- </i>
- True
- False
- in the body
- in the body
- 2
- <ol>
- numbers
- in the head
- </li>
- 4
- <h6>
- tags
- a web server
- About us
- on the browser tab
- 5
- <a>
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids