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.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) colours code to help us (d) hosts websites online
-
2.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Roses are red<br>Kites fly high<br>Stars shine</p> - 3.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 4.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) <\i> (d) </i>
- 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
-
6.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Match report (b) Thanks for visiting. (c) index.html (d) My Hobbies - 7.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
-
8.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="400"> (a) fort.jpg (b) bus.jpg (c) moon.png (d) The full moon - 9.True or false: HTML on its own cannot make headings. (a) True (b) False
-
10.🔍 One closing tag is missing. Which one?
<strong>Fun facts</strong>
<h2>My best friend</h2>
<i>Cricket is fun. (a) </h2> (b) </i> (c) </h3> (d) </strong> - 11.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
-
12.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Birds sing<br>Roses are red</p> - 13.True or false: <title> has a closing tag. (a) False (b) True
- 14.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
15.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) Contact us (b) contact.html (c) About us (d) href - 16.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
-
17.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>My pets</h2>
<h2>I love mangoes.</h2> - 18.Which of these is true of a code editor? (a) saves our .html files (b) opens web pages for us (c) has an address bar (d) sends pages over the net
- 19.True or false: in <img>, src tells which image to load. (a) False (b) True
- 20.True or false: <hr> has a closing tag. (a) True (b) False
- 21.True or false: a web browser turns HTML into a page. (a) False (b) True
- 22.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 23.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
-
24.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<p>Cricket is fun.</p> -
25.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>My pets</p>
<h2>Good morning!</h2>
<h2>Hello, world!</h2> - 26.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
- 27.True or false: <li> shows bullet points. (a) True (b) False
- 28.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h6> or <h3>? (a) <h6> (b) <h3> (c) <h2> (d) <h5>
- 29.📝 What do we need to write HTML? (a) a microphone (b) a paintbrush (c) a plain text editor (d) a printer
-
30.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Hello, world!</p>
<p>Good morning!</p>
<h2>Our school trip</h2>
<p>Rain today</p>
<p>My pets</p> - 31.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <html> (c) </body> (d) <!DOCTYPE html>
-
32.🔍 One closing tag is missing. Which one?
<h3>Good morning!
<i>I love mangoes.</i>
<strong>My best friend</strong> (a) </i> (b) </strong> (c) </u> (d) </h3> - 33.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
- 34.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>
- 35.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 36.Which of these goes in the head? (a) <table> (b) <style> (c) <img> (d) <h1>
-
37.🔍 One closing tag is missing. Which one?
<h3>I love mangoes.</h3>
<strong>Fun facts</strong>
<b>My pets (a) </b> (b) </h3> (c) </strong> (d) </i> -
38.🔗 Where does this link open?
<a href="contact.html">About us</a> (a) in a new tab (b) in the same tab - 39.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
-
40.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) Class 7 Blog (c) index.html (d) All about me
Answer key
- colours code to help us
- 5
- an empty tag
- </i>
- opens it in a new tab
- My Hobbies
- <a href="about.html">
- moon.png
- False
- </i>
- 1
- 4
- True
- in the body
- About us
- -->
- 3
- saves our .html files
- True
- False
- True
- in the head
- <ol>
- 2
- 2
- <ol>
- False
- <h6>
- a plain text editor
- 5
- <!DOCTYPE html>
- </h3>
- <ol>
- <h1>
- False
- <style>
- </b>
- in the same tab
- an attribute
- Class 7 Blog
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids