← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 945 · 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.🔢 In a basic web page file, which comes first: “<body>” or “<html>”? (a) <html> (b) <body>
  2. 2.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
  3. 3.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h1> (d) <h6>
  4. 4.Which of these is true of a web browser? (a) stores a website’s files (b) turns HTML into a page (c) hosts websites online (d) saves our .html files
  5. 5.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  6. 6.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
  7. 7.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
  8. 8.True or false: HTML on its own can make a form. (a) False (b) True
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>My pets</p> -->
  10. 10.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  11. 11.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
  12. 12.True or false: <p> has a closing tag. (a) True (b) False
  13. 13.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>My best friend</h2>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
  14. 14.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <p>The red kite</p>
    (a) Rain today (b) Cricket is fun. (c) The red kite (d) My best friend
  15. 15.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Mango</li>
    </ul>
  16. 16.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.🔢 In a basic web page file, which comes first: “</body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </body>
  18. 18.True or false: a code editor hosts websites online. (a) False (b) True
  19. 19.🔢 In a basic web page file, which comes first: “<html>” or “<!DOCTYPE html>”? (a) <html> (b) <!DOCTYPE html>
  20. 20.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  21. 21.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
  22. 22.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  23. 23.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  24. 24.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="50">
    (a) cake.jpg (b) kite.png (c) A red kite (d) map.png
  25. 25.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ul>
  26. 26.True or false: HTML on its own can make bullet lists. (a) False (b) True
  27. 27.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <p> (d) <ol>
  28. 28.📄 Can HTML on its own make a form? (a) Yes (b) No
  29. 29.Which of these has a closing tag? (a) <hr> (b) <br> (c) <li> (d) <input>
  30. 30.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) </html> (b) <!DOCTYPE html>
  31. 31.Which of these is true of a web server? (a) shows line numbers (b) hosts websites online (c) colours code to help us (d) turns HTML into a page
  32. 32.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as a new line (d) as one space
  33. 33.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
  34. 34.🔠 Are headings shown in bold by default? (a) Yes (b) No
  35. 35.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <\h1> (c) </h1> (d) <h1>
  36. 36.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) body (c) Cricket Club (d) Welcome!
  37. 37.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  38. 38.True or false: <ol> lists steps in order. (a) True (b) False
  39. 39.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  40. 40.🔗 Which address opens when you click this link?
    <a href="about.html">Maths fun</a>
    (a) contact.html (b) https://example.com (c) Maths fun (d) about.html

Answer key

  1. <html>
  2. 6
  3. <h6>
  4. turns HTML into a page
  5. <ul>
  6. a web server
  7. 4
  8. True
  9. 1
  10. No
  11. on the browser tab
  12. True
  13. 4
  14. Rain today
  15. 2
  16. in the head
  17. <!DOCTYPE html>
  18. False
  19. <!DOCTYPE html>
  20. numbers
  21. element
  22. Yes
  23. a closing tag
  24. kite.png
  25. 5
  26. True
  27. <li>
  28. Yes
  29. <li>
  30. <!DOCTYPE html>
  31. hosts websites online
  32. as one space
  33. <!--
  34. Yes
  35. </h1>
  36. Welcome!
  37. an empty tag
  38. True
  39. an empty tag
  40. about.html

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