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 does an HTML comment start? (a) // (b) /* (c) # (d) <!--
- 2.True or false: HTML on its own can add pictures to a page. (a) True (b) False
-
3.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="250"> (a) A happy dog (b) moon.png (c) bus.jpg (d) dog.jpg -
4.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<p>Cricket is fun.</p> (a) My best friend (b) Our school trip (c) Cricket is fun. - 5.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
6.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> --> -
7.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) about.html (b) About us (c) href (d) Contact us - 8.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) </body> (b) <body>
-
9.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="250"> (a) kite.png (b) An old fort (c) fort.jpg (d) tiger.jpg -
10.🔗 Where does this link open?
<a href="games.html">Contact us</a> (a) in a new tab (b) in the same tab - 11.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
12.🔗 Which words do you click on?
<a href="news.html">About us</a> (a) Contact us (b) About us (c) href (d) news.html -
13.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Riya’s Recipes (c) Match report (d) Thanks for visiting. - 14.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <hr> (d) <ul>
-
15.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<p>My pets</p> - 16.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 17.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h3>? (a) <h1> (b) <h2> (c) <h3> (d) <h5>
-
18.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>My best friend</p>
<!-- <p>My pets</p> --> (a) Cricket is fun. (b) My best friend (c) My pets - 19.🔍 Which is the odd one out? (a) answers page requests (b) saves our .html files (c) sends pages over the net (d) hosts websites online
- 20.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
21.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h3>Cricket is fun.</h3>
<h4>I love mangoes.</h4>
<h4>Our school trip</h4> -
22.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Papaya</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets -
23.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) moon.png (b) bus.jpg (c) dog.jpg (d) A happy dog -
24.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) Class 7 Blog (c) My drawings (d) body -
25.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Mango</li>
<li>Jamun</li>
</ol> - 26.True or false: <ol> is an ordered list. (a) True (b) False
-
27.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>I love mangoes.</h2>
<p>I love mangoes.</p>
<p>Good morning!</p>
<p>Fun facts</p> -
28.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Our school trip</p>
<p>Fun facts</p>
<p>Hello, world!</p>
<p>Fun facts</p>
<p>Good morning!</p> -
29.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<!-- <p>My pets</p> -->
<p>My best friend</p> - 30.Which of these is true of a code editor? (a) turns HTML into a page (b) is where we type code (c) sends pages over the net (d) answers page requests
-
31.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Guava</li>
</ul> -
32.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) Welcome! (b) index.html (c) My Hobbies (d) I like to read. -
33.🔗 Which words do you click on?
<a href="games.html">Maths fun</a> (a) Art corner (b) Maths fun (c) href (d) games.html - 34.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) </h2> (c) <h2/> (d) <h2>
-
35.🔗 Which words do you click on?
<a href="about.html">Visit the site</a> (a) about.html (b) href (c) Visit the site (d) Maths fun -
36.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>My best friend</h2>
<p>Cricket is fun.</p>
<p>My best friend</p>
<p>My pets</p> - 37.Which of these is true of a web browser? (a) saves our .html files (b) stores a website’s files (c) shows pages from the web (d) shows line numbers
- 38.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) width (b) A happy dog (c) dog.jpg (d) The full moon - 40.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h2>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>
Answer key
- <!--
- True
- dog.jpg
- My best friend
- Yes
- 1
- About us
- <body>
- fort.jpg
- in the same tab
- has a closing tag
- About us
- Riya’s Recipes
- <ul>
- 2
- in the head
- <h5>
- My pets
- saves our .html files
- No
- 4
- bullets
- dog.jpg
- My drawings
- 3
- True
- 2
- 6
- 2
- is where we type code
- 2
- My Hobbies
- Maths fun
- </h2>
- Visit the site
- 4
- shows pages from the web
- Yes
- A happy dog
- <h5>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids