← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 974 · 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 heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h4>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
  2. 2.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces
  3. 3.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>Hello, world!</h3>
    <p>The red kite</p>
    <p>Hello, world!</p>
  4. 4.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
  5. 5.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Our school trip</p>
    <p>My pets</p>
    <h2>Cricket is fun.</h2>
  6. 6.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  7. 7.True or false: <style> goes in the body. (a) True (b) False
  8. 8.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  9. 9.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="350">
    (a) The full moon (b) fort.jpg (c) moon.png (d) bus.jpg
  10. 10.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  11. 11.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) maths.html (b) art.html (c) https://example.com (d) About us
  12. 12.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
  13. 13.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  14. 14.📋 What number does the browser show next to “Guava”?
    <ol start="3">
      <li>Mango</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  15. 15.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <h2>Hello, world!</h2>
  16. 16.True or false: in <img>, src names the picture file. (a) True (b) False
  17. 17.Which of these is a closing tag? (a) <h1> (b) <p> (c) </body> (d) <li>
  18. 18.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h3>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
  19. 19.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u/> (c) <\u> (d) <u>
  20. 20.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
  21. 21.True or false: <li> has a closing tag. (a) True (b) False
  22. 22.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
  23. 23.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
  24. 24.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h6>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
  25. 25.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  26. 26.True or false: in <img>, height describes the picture. (a) False (b) True
  27. 27.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) kite.png (b) A tiger asleep (c) tiger.jpg (d) map.png
  28. 28.🔍 One closing tag is missing. Which one?
    <h1>The red kite
    <h3>Our school trip</h3>
    <strong>Fun facts</strong>
    (a) </h3> (b) </h2> (c) </strong> (d) </h1>
  29. 29.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    (a) My pets (b) My best friend (c) Hello, world! (d) Cricket is fun.
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="350">
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    <p>Good morning!</p>
  32. 32.💬 Does the browser show comments on the page? (a) Yes (b) No
  33. 33.💾 A web page file usually ends with which extension? (a) .txt (b) .html (c) .mp3 (d) .png
  34. 34.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
  35. 35.True or false: <li> is an unordered list. (a) True (b) False
  36. 36.True or false: <ol> lists steps in order. (a) False (b) True
  37. 37.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) answers page requests (d) colours code to help us
  38. 38.Which of these is true of a web server? (a) hosts websites online (b) is where we type code (c) opens web pages for us (d) colours code to help us
  39. 39.Which of these is an empty tag? (a) <li> (b) <hr> (c) <h1> (d) <p>
  40. 40.True or false: a code editor turns HTML into a page. (a) True (b) False

Answer key

  1. <h5>
  2. as one space
  3. 2
  4. 4
  5. 3
  6. 4
  7. False
  8. 2
  9. moon.png
  10. an empty tag
  11. https://example.com
  12. a slash /
  13. in the body
  14. 5
  15. 2
  16. True
  17. </body>
  18. <h1>
  19. </u>
  20. opens it in a new tab
  21. True
  22. <li>
  23. a line across the page
  24. <h1>
  25. a closing tag
  26. False
  27. tiger.jpg
  28. </h1>
  29. Hello, world!
  30. 350
  31. 2
  32. No
  33. .html
  34. <ol>
  35. False
  36. True
  37. answers page requests
  38. hosts websites online
  39. <hr>
  40. False

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