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 one opens web pages for us? (a) a web browser (b) a web server (c) a code editor
-
2.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing</p> - 3.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
4.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Guava</li>
<li>Mango</li>
</ul> -
5.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Mango</li>
</ol> - 6.Which of these has a closing tag? (a) <b> (b) <img> (c) <meta> (d) <hr>
- 7.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h5>? (a) <h4> (b) <h5> (c) <h2> (d) <h6>
-
8.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="250"> -
9.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Litchi</li>
</ol> - 10.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
- 11.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
- 12.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
-
13.🔗 Which words do you click on?
<a href="quiz.html">Visit the site</a> (a) href (b) Maths fun (c) quiz.html (d) Visit the site - 14.Which of these goes in the head? (a) <ul> (b) <a> (c) <img> (d) <title>
- 15.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
-
16.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Rain today</p>
<!-- <p>My pets</p> --> - 17.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
- 18.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
19.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) https://example.com (b) href (c) About us (d) Play games -
20.🔗 Which words do you click on?
<a href="maths.html">School news</a> (a) maths.html (b) href (c) School news (d) Take the quiz - 21.True or false: in <img>, src names the picture file. (a) True (b) False
- 22.Which of these is an opening tag? (a) <title> (b) </p> (c) </body> (d) </title>
- 23.True or false: <p> goes in the body. (a) False (b) True
-
24.🔗 Where does this link open?
<a href="games.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 25.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 26.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 27.True or false: HTML on its own can make links to pages. (a) True (b) False
-
28.🔍 One closing tag is missing. Which one?
<strong>Good morning!
<u>Cricket is fun.</u>
<h1>The red kite</h1> (a) </u> (b) </h1> (c) </strong> (d) </h3> -
29.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Rain today</p>
<p>My pets</p> - 30.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
- 31.🏷️ Which is the closing tag for <b>? (a) <b> (b) <\b> (c) </b> (d) <b/>
-
32.🔍 Which line is missing its closing tag?
line 1: <h1>My pets</h1>
line 2: <b>Cricket is fun.</b>
line 3: <u>Hello, world! (a) line 2 (b) line 3 (c) line 1 -
33.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) body (b) Class 7 Blog (c) We won by 5 runs. (d) All about me -
34.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<!-- <p>The red kite</p> --> - 35.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 36.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h5>? (a) <h1> (b) <h2> (c) <h3> (d) <h5>
- 37.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h3>? (a) <h5> (b) <h4> (c) <h2> (d) <h3>
-
38.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>The red kite</p>
<h2>Rain today</h2>
<p>Hello, world!</p> - 39.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</body>”? (a) </body> (b) <!DOCTYPE html>
- 40.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to add colour (d) to show pictures
Answer key
- a web browser
- 2
- in the head
- 3
- 2
- <b>
- <h2>
- 250
- 2
- <ol>
- <img>
- a code editor
- Visit the site
- <title>
- <a href="about.html">
- 2
- a slash /
- in the head
- Play games
- School news
- True
- <title>
- True
- in a new tab
- Yes
- True
- True
- </strong>
- 1
- a line across the page
- </b>
- line 3
- All about me
- 1
- No
- <h1>
- <h2>
- 2
- <!DOCTYPE html>
- to leave notes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids