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 heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h1>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
- 2.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
- 3.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) an attribute (d) a comment
-
4.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Rivers flow</p> - 5.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) width (d) src
- 6.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
- 7.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 8.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
- 9.Which of these has a closing tag? (a) <img> (b) <br> (c) <meta> (d) <li>
-
10.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) Birthday cake (b) dog.jpg (c) cake.jpg (d) moon.png - 11.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
- 12.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
- 13.True or false: a code editor stores a website’s files. (a) True (b) False
- 14.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h4>? (a) <h1> (b) <h3> (c) <h6> (d) <h4>
-
15.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) width (b) A happy dog (c) dog.jpg (d) The full moon - 16.Which of these is true of a code editor? (a) sends pages over the net (b) hosts websites online (c) turns HTML into a page (d) is where we type code
- 17.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
-
18.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Mango</li>
<li>Papaya</li>
</ul> -
19.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Grapes</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> -
20.🔗 Where does this link open?
<a href="art.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab -
21.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Stars shine<br>Sky is blue</p> - 22.🔗 What does HyperText mean? (a) text in colour (b) secret text (c) text with links (d) very big text
- 23.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
-
24.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) bus.jpg (b) tiger.jpg (c) fort.jpg (d) Our school bus -
25.🔍 One closing tag is missing. Which one?
<i>Hello, world!
<em>Cricket is fun.</em>
<h3>Rain today</h3> (a) </i> (b) </em> (c) </h3> (d) </h1> -
26.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Cricket is fun.</p>
<h2>I love mangoes.</h2>
<h3>Good morning!</h3> - 27.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
- 28.💬 Does the browser show comments on the page? (a) No (b) Yes
-
29.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Banana</li>
</ol> - 30.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) makes a list (d) adds a picture
- 31.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
- 32.True or false: <style> goes in the head. (a) False (b) True
- 33.True or false: <li> is an ordered list. (a) True (b) False
- 34.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h6>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
-
35.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>My pets</p>
<p>I love mangoes.</p> (a) My pets (b) I love mangoes. (c) Rain today - 36.🔢 In a basic web page file, which comes first: “</head>” or “<body>”? (a) </head> (b) <body>
-
37.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>The red kite</p>
<p>Our school trip</p>
<!-- <p>Good morning!</p> --> -
38.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Good morning!</p>
<!-- <p>Rain today</p> --> - 39.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) alt (d) width
- 40.True or false: HTML on its own can make links to pages. (a) True (b) False
Answer key
- <h1>
- src
- an attribute
- 3
- src
- alt
- has a closing tag
- <a>
- <li>
- cake.jpg
- <ol>
- a web server
- False
- <h1>
- A happy dog
- is where we type code
- to describe the image
- 3
- 2
- in a new tab
- 4
- text with links
- to leave notes
- bus.jpg
- </i>
- 3
- <ul>
- No
- 5
- starts a new line
- opens it in a new tab
- True
- False
- <h1>
- Rain today
- </head>
- 3
- 2
- height
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids