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.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster
-
2.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<p>Our school trip</p>
<p>Cricket is fun.</p> - 3.True or false: HTML on its own cannot make a form. (a) True (b) False
- 4.True or false: <ol> lists steps in order. (a) False (b) True
-
5.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
<li>Papaya</li>
</ol> - 6.Which of these is true of a web browser? (a) shows line numbers (b) turns HTML into a page (c) stores a website’s files (d) saves our .html files
- 7.📝 What does <br> do? (a) adds a picture (b) starts a new line (c) makes a list (d) makes text bold
- 8.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 9.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to leave notes (d) to make links
- 10.Which of these is a closing tag? (a) <li> (b) </p> (c) <b> (d) <p>
- 11.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
-
12.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) index.html (c) Class 7 Blog (d) Welcome! - 13.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
14.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>My pets</h2>
<h2>Cricket is fun.</h2>
<p>Rain today</p>
<h2>Good morning!</h2> - 15.📝 What does <hr> draw? (a) a table (b) a picture (c) a link (d) a line across the page
- 16.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
- 17.Which of these is true of a web browser? (a) saves our .html files (b) colours code to help us (c) is where we type code (d) shows pages from the web
-
18.🔍 One closing tag is missing. Which one?
<small>Cricket is fun.
<i>Our school trip</i>
<h2>I love mangoes.</h2> (a) </h2> (b) </i> (c) </b> (d) </small> - 19.True or false: <style> goes in the body. (a) True (b) False
- 20.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
- 21.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h2>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
- 22.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 23.True or false: <meta> is an empty tag. (a) True (b) False
- 24.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
-
25.📄 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>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Class 7 Blog (c) index.html (d) My drawings - 26.True or false: <meta> has a closing tag. (a) True (b) False
- 27.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
-
28.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) https://example.com (b) href (c) School news (d) Art corner - 29.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h2>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
- 30.True or false: <ol> is an ordered list. (a) True (b) False
- 31.Which of these is a closing tag? (a) <b> (b) </li> (c) <title> (d) <body>
-
32.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Orange</li>
<li>Banana</li>
<li>Guava</li>
<li>Mango</li>
</ul> - 33.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 34.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
-
35.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>Fun facts</h2>
<p>My pets</p>
<p>Rain today</p>
<p>The red kite</p>
<p>My pets</p> -
36.📋 What number does the browser show next to “Litchi”?
<ol start="5">
<li>Papaya</li>
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
<li>Litchi</li>
</ol> - 37.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Modern (c) Markup (d) Machine
-
38.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>My best friend</p> (a) My best friend (b) I love mangoes. (c) Hello, world! (d) My pets - 39.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
- 40.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>
Answer key
- to describe the image
- 3
- False
- True
- 4
- turns HTML into a page
- starts a new line
- -->
- to leave notes
- </p>
- <a>
- Class 7 Blog
- Yes
- 2
- a line across the page
- alt
- shows pages from the web
- </small>
- False
- on the browser tab
- <h1>
- in the body
- True
- No
- Class 7 Blog
- False
- False
- Art corner
- <h4>
- True
- </li>
- 5
- an opening tag
- <a href="about.html">
- 5
- 9
- Markup
- Hello, world!
- <ol>
- <ol>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids