← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 309 · 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 of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <table> (d) <style>
  2. 2.🏷️ Which is the closing tag for <b>? (a) </b> (b) <\b> (c) <b> (d) <b/>
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <p>Fun facts</p>
  4. 4.🔢 In a basic web page file, which comes first: “<body>” or “</html>”? (a) </html> (b) <body>
  5. 5.Which of these has a closing tag? (a) <input> (b) <p> (c) <img> (d) <meta>
  6. 6.Which of these is an opening tag? (a) <h1> (b) </p> (c) </b> (d) </h1>
  7. 7.🔠 Are headings shown in bold by default? (a) Yes (b) No
  8. 8.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  9. 9.True or false: in <img>, height shows if the image fails. (a) True (b) False
  10. 10.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  11. 11.Which of these has a closing tag? (a) <hr> (b) <br> (c) <title> (d) <meta>
  12. 12.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Cricket Club (b) Easy snacks (c) index.html (d) We won by 5 runs.
  13. 13.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the doctype (d) the title
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Stars shine<br>Kites fly high</p>
  15. 15.📝 What does <p> make? (a) a table (b) a picture (c) a paragraph (d) a link
  16. 16.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h6>? (a) <h3> (b) <h2> (c) <h6> (d) <h4>
  17. 17.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  18. 18.🔗 Where does this link open?
    <a href="art.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  19. 19.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  20. 20.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  21. 21.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h3>? (a) <h3> (b) <h1> (c) <h4> (d) <h2>
  22. 22.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h4>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
  23. 23.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  24. 24.True or false: <ul> is an unordered list. (a) False (b) True
  25. 25.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) about.html (b) Visit the site (c) href (d) Maths fun
  26. 26.True or false: a web browser stores a website’s files. (a) False (b) True
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) width (b) cake.jpg (c) Birthday cake (d) A happy dog
  28. 28.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  29. 29.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) an element name (d) a comment
  30. 30.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  31. 31.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>My best friend</h2>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  32. 32.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <!DOCTYPE html> (c) </html> (d) <head>
  33. 33.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <li> (d) <ul>
  34. 34.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    (a) My best friend (b) Good morning! (c) The red kite
  35. 35.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Good morning!</p>
    <h2>My pets</h2>
    <p>Our school trip</p>
    <p>Fun facts</p>
  36. 36.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  37. 37.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  38. 38.True or false: a web browser turns HTML into a page. (a) True (b) False
  39. 39.Which of these is true of a web server? (a) shows line numbers (b) shows pages from the web (c) colours code to help us (d) sends pages over the net
  40. 40.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>

Answer key

  1. <table>
  2. </b>
  3. 3
  4. <body>
  5. <p>
  6. <h1>
  7. Yes
  8. bullets
  9. False
  10. a closing tag
  11. <title>
  12. Cricket Club
  13. the body
  14. 4
  15. a paragraph
  16. <h2>
  17. an empty tag
  18. in a new tab
  19. Yes
  20. bullets
  21. <h1>
  22. <h1>
  23. numbers
  24. True
  25. Visit the site
  26. False
  27. Birthday cake
  28. bullets
  29. an attribute
  30. an empty tag
  31. 4
  32. </html>
  33. <li>
  34. The red kite
  35. 2
  36. 5
  37. has a closing tag
  38. True
  39. sends pages over the net
  40. 2

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