← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 997 · 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.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Good morning!</p> -->
  2. 2.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </body> (b) </head>
  3. 3.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h3>? (a) <h3> (b) <h1> (c) <h4> (d) <h5>
  4. 4.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  5. 5.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  6. 6.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) maths.html (b) Contact us (c) art.html (d) https://example.com
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Stars shine</p>
  8. 8.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
  9. 9.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h2>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  10. 10.True or false: in <img>, src sets how tall it is. (a) True (b) False
  11. 11.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
  12. 12.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  13. 13.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  14. 14.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  15. 15.💬 How does an HTML comment start? (a) /* (b) # (c) // (d) <!--
  16. 16.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) Contact us (b) Visit the site (c) about.html (d) href
  17. 17.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
  18. 18.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  19. 19.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  20. 20.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>Cricket is fun.</h3>
    <h4>My pets</h4>
  21. 21.True or false: a code editor colours code to help us. (a) False (b) True
  22. 22.📋 What number does the browser show next to “Grapes”?
    <ol start="2">
      <li>Guava</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ol>
  23. 23.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 10 (d) 3
  25. 25.📝 What does <hr> draw? (a) a link (b) a table (c) a line across the page (d) a picture
  26. 26.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
  27. 27.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <p>The red kite</p>
  28. 28.Which of these is true of a web browser? (a) answers page requests (b) stores a website’s files (c) saves our .html files (d) turns HTML into a page
  29. 29.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Hello, world!</p>
    <h4>Our school trip</h4>
  30. 30.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
  31. 31.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h6>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
  32. 32.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  33. 33.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
    (a) My pets (b) I love mangoes. (c) The red kite
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="150">
    (a) width (b) Birthday cake (c) Map of India (d) map.png
  35. 35.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  36. 36.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h6>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>
  37. 37.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Mouse (d) Modern
  38. 38.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h5> or <h4>? (a) <h6> (b) <h4> (c) <h3> (d) <h5>
  39. 39.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  40. 40.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers

Answer key

  1. 1
  2. </head>
  3. <h1>
  4. <ul>
  5. 4
  6. https://example.com
  7. 3
  8. a web browser
  9. <h1>
  10. False
  11. element
  12. False
  13. an empty tag
  14. in a new tab
  15. <!--
  16. Contact us
  17. 3
  18. True
  19. <ul>
  20. 3
  21. True
  22. 4
  23. in the head
  24. 1
  25. a line across the page
  26. 2
  27. 4
  28. turns HTML into a page
  29. 2
  30. <li>
  31. <h1>
  32. <!DOCTYPE html>
  33. The red kite
  34. Map of India
  35. in the head
  36. <h1>
  37. Markup
  38. <h3>
  39. <ul>
  40. numbers

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