← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 704 · 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 is true of a web browser? (a) has an address bar (b) colours code to help us (c) is where we type code (d) sends pages over the net
  2. 2.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  3. 3.Which of these is true of a code editor? (a) shows pages from the web (b) colours code to help us (c) hosts websites online (d) answers page requests
  4. 4.Which of these is an empty tag? (a) <hr> (b) <h1> (c) <title> (d) <b>
  5. 5.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  6. 6.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    (a) Hello, world! (b) The red kite (c) Fun facts (d) My pets
  7. 7.💬 Does the browser show comments on the page? (a) Yes (b) No
  8. 8.🔍 One closing tag is missing. Which one?
    <p>Good morning!</p>
    <h2>Our school trip</h2>
    <h1>Fun facts
    (a) </p> (b) </h2> (c) </h1> (d) </u>
  9. 9.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h4>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
  10. 10.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    (a) I love mangoes. (b) Cricket is fun. (c) My pets
  11. 11.True or false: a web browser has an address bar. (a) True (b) False
  12. 12.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  13. 13.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <!DOCTYPE html> (b) <head>
  14. 14.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
  15. 15.True or false: <h1> is an empty tag. (a) True (b) False
  16. 16.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
  17. 17.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  18. 18.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Banana</li>
    </ul>
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Stars shine</p>
  20. 20.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine<br>Roses are red</p>
  21. 21.True or false: HTML on its own cannot keep a high score. (a) False (b) True
  22. 22.Which of these is a closing tag? (a) <li> (b) <p> (c) <body> (d) </body>
  23. 23.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>My pets</h2>
    <p>Rain today</p>
  24. 24.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) https://example.com (b) href (c) Play games (d) Take the quiz
  25. 25.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) Match report (c) I like to read. (d) Riya’s Recipes
  26. 26.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  27. 27.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  28. 28.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 1 (d) 3
  29. 29.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Cricket Club (b) body (c) Easy snacks (d) Here is my best one.
  30. 30.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  31. 31.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Birds sing</p>
  33. 33.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h2>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
  34. 34.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
  35. 35.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
    <p>Hello, world!</p>
    (a) Rain today (b) Hello, world! (c) My best friend (d) Good morning!
  36. 36.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <!-- <p>The red kite</p> -->
    (a) Cricket is fun. (b) Fun facts (c) The red kite
  37. 37.Which of these has a closing tag? (a) <meta> (b) <img> (c) <title> (d) <input>
  38. 38.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h3> (d) <h6>
  39. 39.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
  40. 40.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) answers page requests (d) has an address bar

Answer key

  1. has an address bar
  2. an opening tag
  3. colours code to help us
  4. <hr>
  5. in the body
  6. Fun facts
  7. No
  8. </h1>
  9. <h1>
  10. I love mangoes.
  11. True
  12. 3
  13. <!DOCTYPE html>
  14. 4
  15. False
  16. <h5>
  17. No
  18. 2
  19. 3
  20. 3
  21. True
  22. </body>
  23. 2
  24. Take the quiz
  25. Riya’s Recipes
  26. href
  27. True
  28. 1
  29. Easy snacks
  30. in a new tab
  31. <!DOCTYPE html>
  32. 3
  33. <h4>
  34. to describe the image
  35. Rain today
  36. The red kite
  37. <title>
  38. <h6>
  39. 3
  40. answers page requests

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