← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 662 · 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.True or false: <a> goes in the body. (a) False (b) True
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
  3. 3.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Cricket is fun. (b) My best friend (c) I love mangoes.
  4. 4.True or false: in <img>, src is read by screen readers. (a) False (b) True
  5. 5.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
  6. 6.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  7. 7.Which of these goes in the body? (a) <style> (b) <title> (c) <a> (d) <meta charset="utf-8">
  8. 8.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
  9. 9.📋 What number does the browser show next to “Papaya”?
    <ol start="5">
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  10. 10.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  11. 11.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  12. 12.True or false: in <img>, src sets how tall it is. (a) True (b) False
  13. 13.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
  14. 14.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  15. 15.🔗 Which address opens when you click this link?
    <a href="about.html">Maths fun</a>
    (a) https://example.com (b) about.html (c) contact.html (d) Maths fun
  16. 16.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) School news (b) maths.html (c) href (d) Art corner
  17. 17.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  18. 18.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>Rain today</h2>
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>Our school trip</p>
  19. 19.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <h2>Our school trip</h2>
    <p>Our school trip</p>
  20. 20.🔤 In “HTML”, what does the L stand for? (a) Link (b) Laptop (c) Language (d) Line
  21. 21.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Kites fly high<br>Rivers flow</p>
  22. 22.True or false: in <img>, width sets how tall it is. (a) True (b) False
  23. 23.True or false: in <img>, alt describes the picture. (a) False (b) True
  24. 24.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h6>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
  25. 25.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>My pets</p>
    <p>My pets</p>
    <p>My pets</p>
    <p>Rain today</p>
    <h2>Rain today</h2>
  26. 26.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h2> (d) <h5>
  27. 27.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
  28. 28.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
  29. 29.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) About us (b) Contact us (c) href (d) quiz.html
  30. 30.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h2>? (a) <h4> (b) <h2> (c) <h5> (d) <h3>
  31. 31.True or false: HTML on its own can add up two numbers. (a) False (b) True
  32. 32.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</html>”? (a) <!DOCTYPE html> (b) </html>
  33. 33.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h4>? (a) <h2> (b) <h6> (c) <h1> (d) <h4>
  34. 34.Which of these is an empty tag? (a) <li> (b) <b> (c) <meta> (d) <p>
  35. 35.Which of these has a closing tag? (a) <img> (b) <meta> (c) <p> (d) <br>
  36. 36.Which of these is an opening tag? (a) </li> (b) </body> (c) </h1> (d) <p>
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <h1>Good morning!
    line 2: <strong>Our school trip</strong>
    line 3: <i>I love mangoes.</i>
    (a) line 2 (b) line 1 (c) line 3
  38. 38.📝 What does <p> make? (a) a paragraph (b) a link (c) a picture (d) a table
  39. 39.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) Visit the site (b) href (c) contact.html (d) Maths fun
  40. 40.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    (a) Hello, world! (b) The red kite (c) I love mangoes.

Answer key

  1. True
  2. 1
  3. Cricket is fun.
  4. False
  5. <h1>
  6. No
  7. <a>
  8. <h1>
  9. 6
  10. opens it in a new tab
  11. in a new tab
  12. False
  13. <!--
  14. has a closing tag
  15. about.html
  16. Art corner
  17. has a closing tag
  18. 4
  19. 2
  20. Language
  21. 4
  22. False
  23. True
  24. <h1>
  25. 5
  26. <h1>
  27. <img>
  28. on the browser tab
  29. About us
  30. <h2>
  31. False
  32. <!DOCTYPE html>
  33. <h1>
  34. <meta>
  35. <p>
  36. <p>
  37. line 1
  38. a paragraph
  39. Visit the site
  40. Hello, world!

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