← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 619 · 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 list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  2. 2.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) Play games (b) href (c) About us (d) https://example.com
  3. 3.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  4. 4.True or false: <li> has a closing tag. (a) True (b) False
  5. 5.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
  6. 6.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  7. 7.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  8. 8.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <small>My best friend</small>
    line 2: <u>Cricket is fun.</u>
    line 3: <i>The red kite
    (a) line 2 (b) line 3 (c) line 1
  10. 10.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
  11. 11.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  12. 12.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
  13. 13.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
  14. 14.🔗 Which address opens when you click this link?
    <a href="https://example.com">Play games</a>
    (a) maths.html (b) https://example.com (c) art.html (d) Play games
  15. 15.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a dollar $ (d) a hash #
  16. 16.🔍 One closing tag is missing. Which one?
    <h1>Our school trip</h1>
    <b>Cricket is fun.
    <i>Hello, world!</i>
    (a) </b> (b) </h1> (c) </i> (d) </p>
  17. 17.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a picture (d) a link
  18. 18.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h5>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
  19. 19.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
  20. 20.🔠 Are headings shown in bold by default? (a) No (b) Yes
  21. 21.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
    (a) Fun facts (b) Cricket is fun. (c) My best friend (d) Hello, world!
  22. 22.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
  23. 23.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ul>
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  25. 25.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) body (c) Space Facts (d) Match report
  26. 26.📋 What number does the browser show next to “Grapes”?
    <ol start="2">
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Orange</li>
    </ol>
  27. 27.💬 How does an HTML comment start? (a) <!-- (b) # (c) // (d) /*
  28. 28.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  29. 29.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  30. 30.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red<br>Birds sing</p>
  31. 31.True or false: HTML on its own can keep a high score. (a) True (b) False
  32. 32.Which of these is true of a web browser? (a) colours code to help us (b) hosts websites online (c) opens web pages for us (d) answers page requests
  33. 33.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  34. 34.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    (a) The red kite (b) Our school trip (c) Good morning! (d) Cricket is fun.
  35. 35.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  36. 36.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) maths.html (b) About us (c) href (d) Play games
  37. 37.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>My best friend</h2>
    <p>My pets</p>
    <h4>Our school trip</h4>
  38. 38.🏷️ HTML marks up text using ___. (a) wires (b) pixels (c) tags (d) keys
  39. 39.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
  40. 40.True or false: in <img>, alt tells which image to load. (a) True (b) False

Answer key

  1. <ol>
  2. Play games
  3. No
  4. True
  5. Markup
  6. in a new tab
  7. numbers
  8. an opening tag
  9. line 3
  10. the body
  11. numbers
  12. <h1>
  13. a code editor
  14. https://example.com
  15. a slash /
  16. </b>
  17. a line across the page
  18. <h5>
  19. <a>
  20. Yes
  21. Fun facts
  22. href
  23. 5
  24. 2
  25. Match report
  26. 3
  27. <!--
  28. False
  29. in the body
  30. 3
  31. False
  32. opens web pages for us
  33. False
  34. The red kite
  35. in the head
  36. Play games
  37. 3
  38. tags
  39. a web browser
  40. False

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