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 attribute holds the address of a link? (a) href (b) src (c) alt (d) id
- 2.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
-
3.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Good morning!</p>
<!-- <p>Fun facts</p> --> (a) Hello, world! (b) Fun facts (c) Good morning! - 4.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
- 5.True or false: a code editor is where we type code. (a) False (b) True
- 6.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
- 7.Which of these has a closing tag? (a) <meta> (b) <br> (c) <input> (d) <ul>
- 8.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
9.🔗 Which words do you click on?
<a href="maths.html">Contact us</a> (a) maths.html (b) href (c) Visit the site (d) Contact us - 10.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
-
11.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets -
12.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Guava</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Orange</li>
<li>Litchi</li>
</ol> -
13.🔍 One closing tag is missing. Which one?
<h3>Hello, world!
<u>Rain today</u>
<small>My pets</small> (a) </u> (b) </b> (c) </h3> (d) </small> -
14.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>The red kite</h3>
<p>Fun facts</p>
<p>The red kite</p>
<h3>Fun facts</h3> -
15.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="50"> (a) width (b) Birthday cake (c) map.png (d) Map of India -
16.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) Space Facts (c) All about me (d) index.html - 17.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <!DOCTYPE html> (c) </html> (d) <body>
- 18.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 19.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h6>? (a) <h2> (b) <h6> (c) <h3> (d) <h1>
- 20.True or false: HTML on its own cannot make headings. (a) False (b) True
- 21.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 22.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
- 23.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
- 24.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
- 25.Which of these is true of a web browser? (a) is where we type code (b) stores a website’s files (c) hosts websites online (d) has an address bar
- 26.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
- 27.Which of these has a closing tag? (a) <meta> (b) <br> (c) <input> (d) <h1>
-
28.🔍 Which line is missing its closing tag?
line 1: <i>Rain today</i>
line 2: <h1>Fun facts
line 3: <h2>Hello, world!</h2> (a) line 3 (b) line 1 (c) line 2 - 29.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
30.🖼️ 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) fort.jpg (d) tiger.jpg -
31.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Orange</li>
<li>Guava</li>
</ol> - 32.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
-
33.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Fun facts</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> --> (a) Cricket is fun. (b) Hello, world! (c) My pets (d) Fun facts - 34.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
35.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>My pets</p> -->
<p>I love mangoes.</p> - 36.🔍 Which is the odd one out? (a) shows line numbers (b) sends pages over the net (c) colours code to help us (d) saves our .html files
- 37.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
38.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Guava</li>
</ol> (a) numbers (b) bullets - 39.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
-
40.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Good morning!</p>
<p>My pets</p>
<!-- <p>Rain today</p> --> (a) Cricket is fun. (b) Rain today (c) Good morning! (d) My pets
Answer key
- href
- <li>
- Fun facts
- an attribute
- True
- False
- <ul>
- an empty tag
- Contact us
- <a>
- bullets
- 6
- </h3>
- 3
- Map of India
- Space Facts
- </html>
- No
- <h1>
- False
- Yes
- on the browser tab
- <ul>
- <!DOCTYPE html>
- has an address bar
- opens it in a new tab
- <h1>
- line 2
- Yes
- fort.jpg
- 4
- <!--
- Cricket is fun.
- an opening tag
- 2
- sends pages over the net
- a closing tag
- numbers
- in the body
- Rain today
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids