← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 305 · 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 BIGGEST text: <h2>, <h1>, <h4> or <h3>? (a) <h2> (b) <h4> (c) <h1> (d) <h3>
  2. 2.Which of these is a closing tag? (a) <body> (b) <p> (c) <h1> (d) </li>
  3. 3.True or false: <ol> lists steps in order. (a) True (b) False
  4. 4.📋 What number does the browser show next to “Papaya”?
    <ol start="5">
      <li>Grapes</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  5. 5.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  6. 6.🔍 Which is the odd one out? (a) saves our .html files (b) answers page requests (c) colours code to help us (d) is where we type code
  7. 7.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) dog.jpg (b) A happy dog (c) bus.jpg (d) moon.png
  8. 8.True or false: a code editor has an address bar. (a) True (b) False
  9. 9.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) dog.jpg (b) Birthday cake (c) cake.jpg (d) moon.png
  10. 10.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
  11. 11.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) href (b) Visit the site (c) https://example.com (d) Maths fun
  12. 12.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) Easy snacks (c) Art Gallery (d) I like to read.
  13. 13.📋 What number does the browser show next to “Mango”?
    <ol start="6">
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
  14. 14.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) Art corner (b) about.html (c) contact.html (d) https://example.com
  15. 15.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  16. 16.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
  17. 17.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  18. 18.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <small>Cricket is fun.</small>
    line 2: <em>My pets
    line 3: <b>The red kite</b>
    (a) line 2 (b) line 1 (c) line 3
  20. 20.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <body> (c) </head> (d) <html>
  21. 21.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  22. 22.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <h2>My best friend</h2>
    <p>My best friend</p>
  23. 23.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  24. 24.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
  25. 25.📝 What do we need to write HTML? (a) a microphone (b) a paintbrush (c) a plain text editor (d) a printer
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="150">
  27. 27.🔗 Which address opens when you click this link?
    <a href="about.html">School news</a>
    (a) https://example.com (b) School news (c) contact.html (d) about.html
  28. 28.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h6>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
  29. 29.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  30. 30.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
  31. 31.Which of these is a closing tag? (a) <title> (b) <p> (c) <body> (d) </h1>
  32. 32.🔍 One closing tag is missing. Which one?
    <h1>Fun facts</h1>
    <p>I love mangoes.</p>
    <small>The red kite
    (a) </h3> (b) </p> (c) </small> (d) </h1>
  33. 33.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
  34. 34.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
  35. 35.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
  36. 36.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  37. 37.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Welcome! (c) body (d) Space Facts
  38. 38.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  39. 39.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>My pets</p>
    <h2>Fun facts</h2>
    <h2>Fun facts</h2>
    <h2>Good morning!</h2>
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) width (b) An old fort (c) bus.jpg (d) Our school bus

Answer key

  1. <h1>
  2. </li>
  3. True
  4. 7
  5. in the body
  6. answers page requests
  7. dog.jpg
  8. False
  9. cake.jpg
  10. a code editor
  11. Visit the site
  12. Art Gallery
  13. 7
  14. about.html
  15. in a new tab
  16. Language
  17. 6
  18. 2
  19. line 2
  20. <!DOCTYPE html>
  21. has a closing tag
  22. 3
  23. <ul>
  24. 2
  25. a plain text editor
  26. 150
  27. about.html
  28. <h3>
  29. a closing tag
  30. <!--
  31. </h1>
  32. </small>
  33. <li>
  34. alt
  35. <li>
  36. an empty tag
  37. Welcome!
  38. an opening tag
  39. 2
  40. Our school bus

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