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 picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) A happy dog (b) bus.jpg (c) moon.png (d) dog.jpg - 2.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) height (d) src
- 3.Which of these is a closing tag? (a) <p> (b) </title> (c) <b> (d) <h1>
-
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="400"> (a) An old fort (b) fort.jpg (c) width (d) A tiger asleep -
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) Map of India (b) Birthday cake (c) map.png (d) width - 6.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
-
7.📋 What number does the browser show next to “Papaya”?
<ol start="5">
<li>Guava</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Orange</li>
<li>Banana</li>
<li>Jamun</li>
</ol> -
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg - 9.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a picture (d) a table
-
10.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Mango</li>
<li>Litchi</li>
<li>Orange</li>
</ul> - 11.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a slash / (d) a dollar $
- 12.💬 Does the browser show comments on the page? (a) No (b) Yes
- 13.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <meta charset="utf-8"> (d) <style>
- 14.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) nowhere (d) at the bottom
-
15.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="300"> - 16.Which of these is true of a web server? (a) shows line numbers (b) shows pages from the web (c) stores a website’s files (d) saves our .html files
-
17.🔗 Where does this link open?
<a href="games.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab - 18.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) width (d) height
- 19.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h1> (d) <h6>
- 20.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h5>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
- 21.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
-
22.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) Contact us (b) contact.html (c) href (d) About us - 23.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 24.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
- 25.True or false: <li> lists steps in order. (a) True (b) False
- 26.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
-
27.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>Hello, world!</p> (a) My best friend (b) Hello, world! (c) Rain today - 28.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) width (d) alt
- 29.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [
- 30.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h4>? (a) <h6> (b) <h4> (c) <h5> (d) <h2>
-
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="150"> (a) The full moon (b) moon.png (c) width (d) Our school bus -
32.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep - 33.True or false: HTML on its own can add pictures to a page. (a) True (b) False
- 34.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h1> or <h3>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
-
35.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p>
<p>Good morning!</p>
<p>I love mangoes.</p>
<p>The red kite</p> -
36.📄 What does the browser tab show for 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) Class 7 Blog (b) index.html (c) All about me (d) We won by 5 runs. - 37.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
- 38.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Mouse (d) Machine
-
39.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="250"> - 40.📄 Can HTML on its own make tables? (a) No (b) Yes
Answer key
- dog.jpg
- src
- </title>
- An old fort
- Map of India
- to leave notes
- 7
- A tiger asleep
- a line across the page
- 4
- a slash /
- No
- <table>
- on the browser tab
- 300
- stores a website’s files
- in a new tab
- alt
- <h1>
- <h5>
- <ol>
- About us
- in the head
- opens it in a new tab
- False
- <img>
- Rain today
- src
- <
- <h2>
- The full moon
- A tiger asleep
- True
- <h1>
- 4
- Class 7 Blog
- a code editor
- Markup
- 250
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids