← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 880 · 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.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <h2> (d) <\h2>
  2. 2.🔗 Which words do you click on?
    <a href="maths.html">School news</a>
    (a) School news (b) maths.html (c) href (d) Take the quiz
  3. 3.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  4. 4.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
  5. 5.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
  6. 6.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) height (d) alt
  7. 7.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h6> or <h1>? (a) <h6> (b) <h1> (c) <h2> (d) <h4>
  8. 8.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  9. 9.🔗 Where does this link open?
    <a href="contact.html">About us</a>
    (a) in the same tab (b) in a new tab
  10. 10.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to show pictures (d) to make links
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="400">
    (a) width (b) moon.png (c) The full moon (d) Our school bus
  12. 12.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h4>Cricket is fun.</h4>
    <h4>I love mangoes.</h4>
    <h4>I love mangoes.</h4>
  13. 13.True or false: <ul> shows bullet points. (a) False (b) True
  14. 14.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
    (a) I love mangoes. (b) Rain today (c) Fun facts
  15. 15.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Thanks for visiting. (c) My drawings (d) Space Facts
  16. 16.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    (a) My best friend (b) Hello, world! (c) Cricket is fun.
  17. 17.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    (a) Fun facts (b) Good morning! (c) My pets
  18. 18.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    (a) Rain today (b) My pets (c) Fun facts
  19. 19.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  20. 20.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ul>
    (a) numbers (b) bullets
  21. 21.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) height (c) src (d) alt
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <h3>Hello, world!</h3>
    line 2: <strong>Our school trip</strong>
    line 3: <em>Good morning!
    (a) line 1 (b) line 3 (c) line 2
  23. 23.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Hello, world!</p>
    <h2>I love mangoes.</h2>
  24. 24.Which of these is an opening tag? (a) </title> (b) </h1> (c) </li> (d) <body>
  25. 25.Which of these is true of a code editor? (a) turns HTML into a page (b) sends pages over the net (c) shows line numbers (d) shows pages from the web
  26. 26.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
  27. 27.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) Thanks for visiting. (c) All about me (d) Cricket Club
  29. 29.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) <u/> (d) </u>
  30. 30.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h6>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
  31. 31.Which of these is a closing tag? (a) </li> (b) <li> (c) <body> (d) <p>
  32. 32.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) Contact us (b) games.html (c) Visit the site (d) href
  33. 33.🔍 One closing tag is missing. Which one?
    <i>Good morning!</i>
    <em>My best friend</em>
    <small>Cricket is fun.
    (a) </em> (b) </i> (c) </small> (d) </strong>
  34. 34.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
  35. 35.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <p>
  36. 36.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) src (d) width
  37. 37.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h2>? (a) <h1> (b) <h2> (c) <h5> (d) <h4>
  38. 38.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>The red kite</p>
    (a) The red kite (b) Our school trip (c) Fun facts (d) Hello, world!
  39. 39.True or false: HTML on its own cannot pick a random number. (a) False (b) True
  40. 40.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="200">
    (a) kite.png (b) cake.jpg (c) A red kite (d) map.png

Answer key

  1. </h2>
  2. School news
  3. True
  4. <li>
  5. 1
  6. src
  7. <h1>
  8. No
  9. in the same tab
  10. to leave notes
  11. The full moon
  12. 4
  13. True
  14. Rain today
  15. Space Facts
  16. Hello, world!
  17. My pets
  18. Rain today
  19. <ol>
  20. bullets
  21. alt
  22. line 3
  23. 2
  24. <body>
  25. shows line numbers
  26. on the browser tab
  27. an opening tag
  28. All about me
  29. </u>
  30. <h1>
  31. </li>
  32. Contact us
  33. </small>
  34. <li>
  35. <p>
  36. src
  37. <h5>
  38. Hello, world!
  39. True
  40. kite.png

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