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.📄 Can HTML on its own make headings? (a) Yes (b) No
- 2.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) src (d) height
- 3.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
-
4.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
<li>Mango</li>
<li>Grapes</li>
<li>Guava</li>
</ol> - 5.Which of these is true of a web server? (a) is where we type code (b) turns HTML into a page (c) sends pages over the net (d) colours code to help us
- 6.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
- 7.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h5>? (a) <h2> (b) <h6> (c) <h1> (d) <h5>
- 8.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
- 9.Which of these is an empty tag? (a) <title> (b) <h1> (c) <hr> (d) <p>
- 10.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
-
11.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) Take the quiz (b) maths.html (c) href (d) Play games - 12.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </body> (c) <!DOCTYPE html> (d) <html>
- 13.True or false: <img> goes in the body. (a) False (b) True
- 14.True or false: in <img>, src shows if the image fails. (a) True (b) False
- 15.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
-
16.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Rain today (c) My best friend -
17.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Rain today</p> -->
<p>Hello, world!</p> (a) I love mangoes. (b) Hello, world! (c) Rain today -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) width (b) cake.jpg (c) Birthday cake (d) A happy dog -
19.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) Contact us (b) About us (c) about.html (d) href - 20.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) stores a website’s files (d) opens web pages for us
- 21.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
- 22.True or false: in <img>, alt names the picture file. (a) True (b) False
- 23.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ul> (d) <ol>
- 24.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h6>
-
25.🔍 One closing tag is missing. Which one?
<u>My pets
<p>The red kite</p>
<small>Cricket is fun.</small> (a) </small> (b) </p> (c) </i> (d) </u> -
26.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h3>Good morning!</h3>
<p>I love mangoes.</p>
<p>Rain today</p> - 27.Which of these goes in the head? (a) <h1> (b) <p> (c) <style> (d) <ul>
- 28.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) A happy dog (b) dog.jpg (c) width (d) The full moon - 30.True or false: in <img>, width names the picture file. (a) False (b) True
- 31.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a new line (c) as a dot (d) as 5 spaces
- 32.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
- 33.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
-
34.📋 What number does the browser show next to “Banana”?
<ol start="9">
<li>Guava</li>
<li>Banana</li>
<li>Mango</li>
</ol> -
35.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>Fun facts</p>
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<p>My best friend</p> - 36.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
- 37.True or false: in <img>, height shows if the image fails. (a) True (b) False
-
38.🔗 Which words do you click on?
<a href="https://example.com">School news</a> (a) School news (b) Take the quiz (c) https://example.com (d) href -
39.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Maths fun</a> (a) in the same tab (b) in a new tab - 40.Which of these has a closing tag? (a) <input> (b) <br> (c) <meta> (d) <p>
Answer key
- Yes
- src
- element
- 6
- sends pages over the net
- .html
- <h1>
- <a href="about.html">
- <hr>
- in the head
- Take the quiz
- </html>
- True
- False
- <a>
- Rain today
- Rain today
- Birthday cake
- About us
- opens web pages for us
- 1
- False
- <ol>
- <h6>
- </u>
- 2
- <style>
- an opening tag
- A happy dog
- False
- as one space
- 6
- on the browser tab
- 10
- 4
- <ul>
- False
- School news
- in a new tab
- <p>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids