← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 392 · 40 questions
TalentJR

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. 1.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <h1>Our school trip</h1>
    <strong>Good morning!
    (a) </h3> (b) </h2> (c) </strong> (d) </h1>
  2. 2.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  3. 3.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  4. 4.📋 What number does the browser show next to “Mango”?
    <ol start="3">
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  5. 5.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h2>? (a) <h1> (b) <h5> (c) <h2> (d) <h4>
  6. 6.True or false: <ul> lists things in any order. (a) False (b) True
  7. 7.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  8. 8.Which of these is an empty tag? (a) <h1> (b) <b> (c) <li> (d) <input>
  9. 9.Which of these goes in the body? (a) <ul> (b) <style> (c) <link rel="stylesheet"> (d) <title>
  10. 10.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
    (a) Our school trip (b) Fun facts (c) I love mangoes. (d) My pets
  11. 11.Which of these is true of a web server? (a) has an address bar (b) answers page requests (c) colours code to help us (d) opens web pages for us
  12. 12.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
    (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep
  14. 14.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Space Facts (c) Thanks for visiting. (d) Planets
  15. 15.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </body> (c) </html> (d) </head>
  16. 16.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
  18. 18.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>My best friend</p> -->
  20. 20.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  21. 21.True or false: <ul> goes inside ul or ol. (a) True (b) False
  22. 22.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) </h1> (d) <h1/>
  23. 23.Which of these is an opening tag? (a) </b> (b) </li> (c) </title> (d) <h1>
  24. 24.🧱 HTML gives a web page its ___. (a) sound (b) structure (c) colours (d) speed
  25. 25.True or false: <li> is an ordered list. (a) True (b) False
  26. 26.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
  27. 27.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
  28. 28.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <h3>Fun facts</h3>
    line 2: <i>Cricket is fun.
    line 3: <b>Good morning!</b>
    (a) line 1 (b) line 3 (c) line 2
  30. 30.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
  31. 31.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h6> or <h3>? (a) <h3> (b) <h5> (c) <h6> (d) <h1>
  32. 32.True or false: HTML on its own can make a form. (a) False (b) True
  33. 33.True or false: in <img>, src is read by screen readers. (a) True (b) False
  34. 34.True or false: <ol> is an unordered list. (a) True (b) False
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
  36. 36.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
  37. 37.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Hello, world!</p>
    <p>My pets</p>
    <h4>My pets</h4>
  38. 38.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) Art corner (b) href (c) Maths fun (d) about.html
  39. 39.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Birds sing<br>Sky is blue</p>
  40. 40.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Sky is blue</p>

Answer key

  1. </strong>
  2. No
  3. <a>
  4. 5
  5. <h1>
  6. True
  7. on the browser tab
  8. <input>
  9. <ul>
  10. Fun facts
  11. answers page requests
  12. Yes
  13. A tiger asleep
  14. Space Facts
  15. </html>
  16. an opening tag
  17. 1
  18. alt
  19. 1
  20. in the head
  21. False
  22. </h1>
  23. <h1>
  24. structure
  25. False
  26. <li>
  27. an attribute
  28. 3
  29. line 2
  30. a line across the page
  31. <h6>
  32. True
  33. False
  34. False
  35. 1
  36. to describe the image
  37. 2
  38. Maths fun
  39. 4
  40. 3

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids