← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 877 · 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.📄 Can HTML on its own make tables? (a) No (b) Yes
  2. 2.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h5>? (a) <h5> (b) <h3> (c) <h1> (d) <h4>
  3. 3.True or false: <h1> goes in the body. (a) False (b) True
  4. 4.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
  5. 5.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>My best friend</p> -->
  6. 6.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
  7. 7.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
  8. 8.True or false: a code editor is where we type code. (a) True (b) False
  9. 9.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
  10. 10.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h6> or <h1>? (a) <h6> (b) <h5> (c) <h4> (d) <h1>
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Birds sing<br>Kites fly high<br>Roses are red</p>
  12. 12.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.</h1>
    <u>Rain today
    <h2>My best friend</h2>
    (a) </h1> (b) </u> (c) </em> (d) </h2>
  13. 13.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  14. 14.Which of these has a closing tag? (a) <li> (b) <meta> (c) <br> (d) <img>
  15. 15.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 4 (d) 6
  16. 16.🖼️ 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) A tiger asleep (d) tiger.jpg
  17. 17.🔗 Where does this link open?
    <a href="maths.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  18. 18.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  19. 19.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
  20. 20.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Space Facts (b) Welcome! (c) We won by 5 runs. (d) body
  21. 21.💬 Does the browser show comments on the page? (a) Yes (b) No
  22. 22.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h3>? (a) <h4> (b) <h5> (c) <h1> (d) <h3>
  23. 23.🔗 Where does this link open?
    <a href="about.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  24. 24.🏷️ Which is the closing tag for <i>? (a) </i> (b) <i/> (c) <\i> (d) <i>
  25. 25.💬 How does an HTML comment end? (a) // (b) >> (c) */ (d) -->
  26. 26.Which of these is an empty tag? (a) <ul> (b) <b> (c) <title> (d) <hr>
  27. 27.🔍 One closing tag is missing. Which one?
    <h2>My pets</h2>
    <h1>The red kite</h1>
    <small>Our school trip
    (a) </h2> (b) </h3> (c) </small> (d) </h1>
  28. 28.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  29. 29.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Maths fun</a>
    (a) in a new tab (b) in the same tab
  30. 30.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) A tiger asleep (b) map.png (c) tiger.jpg (d) kite.png
  31. 31.True or false: <img> has a closing tag. (a) True (b) False
  32. 32.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    <p>Fun facts</p>
  33. 33.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h5>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
  34. 34.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>Our school trip</h2>
    <p>My best friend</p>
    <h3>Our school trip</h3>
  35. 35.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
  36. 36.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
  37. 37.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
  38. 38.🔍 One closing tag is missing. Which one?
    <small>The red kite</small>
    <h1>Our school trip
    <h2>Hello, world!</h2>
    (a) </h2> (b) </em> (c) </small> (d) </h1>
  39. 39.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  40. 40.🔍 Which line is missing its closing tag?
    line 1: <strong>Hello, world!
    line 2: <i>Good morning!</i>
    line 3: <u>The red kite</u>
    (a) line 3 (b) line 1 (c) line 2

Answer key

  1. Yes
  2. <h5>
  3. True
  4. 5
  5. 1
  6. opens it in a new tab
  7. 1
  8. True
  9. <h1>
  10. <h1>
  11. 5
  12. </u>
  13. a web browser
  14. <li>
  15. 6
  16. A tiger asleep
  17. in a new tab
  18. No
  19. to describe the image
  20. Welcome!
  21. No
  22. <h1>
  23. in the same tab
  24. </i>
  25. -->
  26. <hr>
  27. </small>
  28. in the body
  29. in a new tab
  30. tiger.jpg
  31. False
  32. 3
  33. <h6>
  34. 3
  35. a line across the page
  36. <img>
  37. on the browser tab
  38. </h1>
  39. an empty tag
  40. line 1

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