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 headings are in this code?
<h1>Good morning!</h1>
<h3>Rain today</h3>
<p>Cricket is fun.</p>
<h2>My best friend</h2>
<h3>Rain today</h3> - 2.True or false: in <img>, src tells which image to load. (a) False (b) True
-
3.🔍 Which line is missing its closing tag?
line 1: <small>My pets
line 2: <strong>Rain today</strong>
line 3: <h1>Good morning!</h1> (a) line 2 (b) line 1 (c) line 3 - 4.📄 Can HTML on its own make tables? (a) No (b) Yes
- 5.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
-
6.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Banana</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets -
7.🔍 One closing tag is missing. Which one?
<h1>Good morning!
<b>The red kite</b>
<h3>Rain today</h3> (a) </h3> (b) </h1> (c) </u> (d) </b> -
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) cake.jpg (b) width (c) Birthday cake (d) A happy dog - 9.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 10.True or false: <input> has a closing tag. (a) True (b) False
-
11.🔗 Which words do you click on?
<a href="contact.html">Art corner</a> (a) School news (b) Art corner (c) href (d) contact.html - 12.True or false: a web browser saves our .html files. (a) True (b) False
-
13.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>Fun facts</p> - 14.Which of these is an empty tag? (a) <li> (b) <title> (c) <hr> (d) <h1>
- 15.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 16.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
- 17.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
18.📋 What number does the browser show next to “Guava”?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Guava</li>
</ol> - 19.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <title> (d) <img>
- 20.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
-
21.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high<br>Birds sing<br>Roses are red</p> -
22.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) Art corner (b) href (c) art.html (d) Maths fun - 23.True or false: <ul> goes in the head. (a) True (b) False
- 24.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 25.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
- 26.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 27.Which of these is true of a code editor? (a) answers page requests (b) turns HTML into a page (c) is where we type code (d) has an address bar
- 28.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
- 29.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h6> or <h1>? (a) <h3> (b) <h4> (c) <h1> (d) <h6>
- 30.True or false: <ul> lists steps in order. (a) True (b) False
-
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) A red kite (b) width (c) A tiger asleep (d) tiger.jpg - 32.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <br> (d) <hr>
- 33.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
34.📋 What number does the browser show next to “Banana”?
<ol start="2">
<li>Guava</li>
<li>Litchi</li>
<li>Banana</li>
</ol> - 35.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 36.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
- 37.Which of these goes in the body? (a) <title> (b) <h1> (c) <link rel="stylesheet"> (d) <style>
- 38.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) alt (d) height
-
39.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) My drawings (c) Cricket Club (d) Thanks for visiting. - 40.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
Answer key
- 4
- True
- line 1
- Yes
- <a href="about.html">
- bullets
- </h1>
- Birthday cake
- in the head
- False
- Art corner
- False
- 2
- <hr>
- in the head
- href
- in the body
- 3
- <img>
- a web server
- 4
- Maths fun
- False
- Yes
- to leave notes
- Yes
- is where we type code
- 1
- <h1>
- False
- A tiger asleep
- <ol>
- Yes
- 4
- Yes
- <a>
- <h1>
- alt
- Cricket Club
- <ul>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids