← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 634 · 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 an opening tag? (a) </b> (b) </body> (c) <title> (d) </p>
  2. 2.True or false: <ol> is an unordered list. (a) False (b) True
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <i>Cricket is fun.</i>
    line 2: <strong>My pets
    line 3: <u>Fun facts</u>
    (a) line 3 (b) line 2 (c) line 1
  4. 4.Which of these is an opening tag? (a) </li> (b) </title> (c) <p> (d) </p>
  5. 5.True or false: HTML on its own can add pictures to a page. (a) True (b) False
  6. 6.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <p> (d) <h1>
  7. 7.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) Contact us (b) href (c) https://example.com (d) Visit the site
  8. 8.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <p> (d) <h6>
  9. 9.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Good morning!</p>
    <h3>Cricket is fun.</h3>
    <h4>Cricket is fun.</h4>
  10. 10.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Space Facts (b) index.html (c) Try this poha. (d) Planets
  11. 11.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  12. 12.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
  13. 13.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  14. 14.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as one space (d) as a dot
  15. 15.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ul>
  16. 16.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
  17. 17.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) width (b) cake.jpg (c) Birthday cake (d) A happy dog
  19. 19.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  20. 20.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <p>The red kite</p>
  21. 21.True or false: in <img>, src sets how tall it is. (a) False (b) True
  22. 22.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <p> (d) <style>
  23. 23.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>The red kite</p>
    <h4>My pets</h4>
  25. 25.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
  26. 26.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) A tiger asleep (b) kite.png (c) map.png (d) tiger.jpg
  27. 27.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    (a) I love mangoes. (b) Fun facts (c) Cricket is fun.
  28. 28.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  29. 29.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Rain today</p>
    <p>My pets</p>
  30. 30.Which of these is an empty tag? (a) <li> (b) <p> (c) <h1> (d) <img>
  31. 31.Which of these goes in the head? (a) <img> (b) <h1> (c) <style> (d) <a>
  32. 32.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>Good morning!</p>
    <p>Rain today</p>
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Birds sing</p>
  34. 34.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) </h3> (c) <\h3> (d) <h3>
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <small>My best friend</small>
    line 2: <em>Cricket is fun.</em>
    line 3: <h1>My pets
    (a) line 2 (b) line 3 (c) line 1
  36. 36.🏷️ Which is the closing tag for <b>? (a) <b/> (b) <b> (c) </b> (d) <\b>
  37. 37.True or false: <ul> goes in the body. (a) False (b) True
  38. 38.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  39. 39.📝 What does <br> do? (a) makes a list (b) starts a new line (c) adds a picture (d) makes text bold
  40. 40.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--

Answer key

  1. <title>
  2. False
  3. line 2
  4. <p>
  5. True
  6. <h6>
  7. Contact us
  8. <h1>
  9. 3
  10. Space Facts
  11. <ul>
  12. <a>
  13. Yes
  14. as one space
  15. 4
  16. 4
  17. 3
  18. Birthday cake
  19. an opening tag
  20. 3
  21. False
  22. <p>
  23. an opening tag
  24. 2
  25. 6
  26. tiger.jpg
  27. Fun facts
  28. Yes
  29. 3
  30. <img>
  31. <style>
  32. 1
  33. 3
  34. </h3>
  35. line 3
  36. </b>
  37. True
  38. No
  39. starts a new line
  40. <!--

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