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 paragraphs does this code make?
<p>Rain today</p>
<h2>The red kite</h2>
<h2>Hello, world!</h2>
<p>Fun facts</p>
<p>Fun facts</p> -
2.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Papaya</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Grapes</li>
</ol> - 3.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <h3> (d) <p>
-
4.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Class 7 Blog (b) My drawings (c) We won by 5 runs. (d) index.html - 5.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
-
6.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) My drawings (c) Thanks for visiting. (d) Riya’s Recipes - 7.🌐 Which one colours code to help us? (a) a code editor (b) a web server (c) a web browser
-
8.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Orange</li>
<li>Guava</li>
</ul> -
9.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<!-- <p>Our school trip</p> --> - 10.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
11.🔗 Which address opens when you click this link?
<a href="quiz.html">Maths fun</a> (a) Maths fun (b) about.html (c) quiz.html (d) games.html - 12.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
- 13.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) on the browser tab (d) at the bottom
- 14.Which of these has a closing tag? (a) <ul> (b) <br> (c) <hr> (d) <meta>
- 15.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 16.Which of these goes in the head? (a) <img> (b) <ul> (c) <a> (d) <link rel="stylesheet">
-
17.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>My best friend</p>
<p>Good morning!</p> (a) Good morning! (b) Our school trip (c) My best friend -
18.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>My pets</p> (a) My pets (b) Cricket is fun. (c) I love mangoes. -
19.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Hello, world!</p>
<h2>Hello, world!</h2> - 20.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
- 21.True or false: a code editor is where we type code. (a) True (b) False
- 22.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <\h1> (c) <h1> (d) <h1/>
- 23.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
- 24.Which of these is true of a web browser? (a) hosts websites online (b) has an address bar (c) is where we type code (d) stores a website’s files
- 25.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces
- 26.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h5>? (a) <h5> (b) <h1> (c) <h6> (d) <h2>
- 27.Which of these is a closing tag? (a) <body> (b) </body> (c) <p> (d) <h1>
- 28.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
- 29.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
30.📋 What number does the browser show next to “Litchi”?
<ol start="7">
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
<li>Banana</li>
<li>Mango</li>
<li>Litchi</li>
</ol> -
31.🔍 Which line is missing its closing tag?
line 1: <b>Fun facts
line 2: <h2>Cricket is fun.</h2>
line 3: <i>My best friend</i> (a) line 2 (b) line 3 (c) line 1 - 32.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
- 33.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
- 34.📄 Can HTML on its own pick a random number? (a) No (b) Yes
- 35.💬 Does the browser show comments on the page? (a) No (b) Yes
-
36.🔍 One closing tag is missing. Which one?
<em>Good morning!</em>
<strong>Our school trip</strong>
<b>The red kite (a) </strong> (b) </b> (c) </em> (d) </i> -
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) An old fort (b) width (c) bus.jpg (d) Our school bus - 38.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
-
39.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Fun facts</p>
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p> (a) Our school trip (b) Fun facts (c) I love mangoes. (d) My pets -
40.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) body (b) We won by 5 runs. (c) Planets (d) Cricket Club
Answer key
- 3
- 3
- <h6>
- Class 7 Blog
- alt
- My drawings
- a code editor
- 3
- 1
- an opening tag
- quiz.html
- a paragraph
- on the browser tab
- <ul>
- in the body
- <link rel="stylesheet">
- Our school trip
- I love mangoes.
- 2
- <a href="about.html">
- True
- </h1>
- <ul>
- has an address bar
- as one space
- <h6>
- </body>
- <li>
- an empty tag
- 12
- line 1
- <ol>
- <h4>
- No
- No
- </b>
- Our school bus
- No
- Our school trip
- Planets
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids