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.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <body> (b) <head>
- 2.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
- 3.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
- 4.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) pixels (d) keys
- 5.True or false: HTML on its own can add pictures to a page. (a) False (b) True
- 6.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
- 7.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
8.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Good morning!</p>
<p>Cricket is fun.</p> (a) Good morning! (b) The red kite (c) Cricket is fun. - 9.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
10.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) bus.jpg (b) Our school bus (c) fort.jpg (d) tiger.jpg -
11.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) index.html (b) Welcome! (c) Mars is red. (d) Class 7 Blog - 12.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 13.Which of these is an opening tag? (a) </h1> (b) </b> (c) </p> (d) <body>
-
14.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>My best friend</p>
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p> (a) My best friend (b) Rain today (c) I love mangoes. (d) Hello, world! -
15.🔍 One closing tag is missing. Which one?
<h3>My pets</h3>
<i>I love mangoes.</i>
<u>Rain today (a) </h3> (b) </u> (c) </i> (d) </strong> - 16.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
- 17.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) turns HTML into a page (d) saves our .html files
- 18.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
- 19.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
20.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Roses are red</p> -
21.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) contact.html (b) href (c) Visit the site (d) Contact us - 22.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) alt (d) src
-
23.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>Our school trip</h4>
<p>Our school trip</p> -
24.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Hello, world!</p>
<p>My best friend</p>
<p>The red kite</p> - 25.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) < (d) [
-
26.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) My Hobbies (b) Mars is red. (c) Planets (d) body - 27.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 28.True or false: in <img>, height sets how wide it is. (a) False (b) True
- 29.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
- 30.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <ul> (d) <br>
- 31.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the body (d) the doctype
-
32.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> --> (a) Rain today (b) Good morning! (c) Cricket is fun. - 33.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
- 34.True or false: <ol> shows bullet points. (a) True (b) False
- 35.💬 Does the browser show comments on the page? (a) No (b) Yes
- 36.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
-
37.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h3>I love mangoes.</h3>
<p>My pets</p>
<p>Hello, world!</p>
<h2>I love mangoes.</h2> - 38.True or false: HTML on its own cannot make tables. (a) True (b) False
- 39.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
-
40.📋 What number does the browser show next to “Guava”?
<ol>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
<li>Banana</li>
<li>Papaya</li>
</ol>
Answer key
- <head>
- <ol>
- opens it in a new tab
- tags
- True
- a web server
- in the body
- The red kite
- a closing tag
- bus.jpg
- Class 7 Blog
- Yes
- <body>
- I love mangoes.
- </u>
- No
- saves our .html files
- href
- Yes
- 3
- Contact us
- alt
- 2
- 4
- <
- Planets
- an opening tag
- False
- a code editor
- <ul>
- the body
- Cricket is fun.
- starts a new line
- False
- No
- <h5>
- 3
- False
- <ul>
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids