← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 108 · 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 list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  2. 2.🔍 Which is the odd one out? (a) shows pages from the web (b) turns HTML into a page (c) stores a website’s files (d) has an address bar
  3. 3.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) maths.html (b) Take the quiz (c) href (d) Play games
  4. 4.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  5. 5.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  6. 6.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
  7. 7.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  8. 8.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    (a) I love mangoes. (b) Cricket is fun. (c) The red kite (d) Hello, world!
  9. 9.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    (a) The red kite (b) My pets (c) Fun facts (d) I love mangoes.
  10. 10.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h2> (d) <h4>
  11. 11.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  12. 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.📋 What number does the browser show next to “Guava”?
    <ol start="8">
      <li>Litchi</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
  14. 14.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  15. 15.True or false: a code editor opens web pages for us. (a) True (b) False
  16. 16.🔗 Where does this link open?
    <a href="art.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  17. 17.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="250">
  18. 18.🌍 Which program shows a web page to us? (a) a music player (b) a web browser (c) a calculator (d) a paint program
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing<br>Kites fly high</p>
  20. 20.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
  21. 21.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    (a) My pets (b) Hello, world! (c) The red kite (d) Fun facts
  22. 22.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
  23. 23.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  24. 24.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h3>Hello, world!</h3>
    <h2>My best friend</h2>
    <h2>The red kite</h2>
    <h3>The red kite</h3>
  25. 25.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
  26. 26.Which of these goes in the head? (a) <h1> (b) <table> (c) <p> (d) <title>
  27. 27.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  28. 28.Which of these is true of a code editor? (a) turns HTML into a page (b) opens web pages for us (c) has an address bar (d) shows line numbers
  29. 29.🔤 In “HTML”, what does the L stand for? (a) Language (b) Laptop (c) Link (d) Line
  30. 30.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Cricket is fun.</h2>
    <h2>Good morning!</h2>
  31. 31.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) height (d) width
  32. 32.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
  33. 33.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <\h1> (c) </h1> (d) <h1>
  34. 34.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
  35. 35.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a microphone (d) a paintbrush
  36. 36.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ul>
    (a) numbers (b) bullets
  37. 37.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="150">
    (a) cake.jpg (b) dog.jpg (c) map.png (d) Map of India
  38. 38.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  39. 39.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) All about me (c) index.html (d) Space Facts
  40. 40.🔍 One closing tag is missing. Which one?
    <h1>My pets</h1>
    <em>Our school trip</em>
    <p>My best friend
    (a) </u> (b) </em> (c) </h1> (d) </p>

Answer key

  1. <ul>
  2. stores a website’s files
  3. Take the quiz
  4. in the body
  5. bullets
  6. -->
  7. an opening tag
  8. The red kite
  9. Fun facts
  10. <h2>
  11. in a new tab
  12. in the head
  13. 11
  14. opens it in a new tab
  15. False
  16. in the same tab
  17. 250
  18. a web browser
  19. 3
  20. on the browser tab
  21. Fun facts
  22. 2
  23. <ul>
  24. 5
  25. False
  26. <title>
  27. Yes
  28. shows line numbers
  29. Language
  30. 1
  31. alt
  32. to describe the image
  33. </h1>
  34. <img>
  35. a plain text editor
  36. bullets
  37. map.png
  38. 2
  39. Space Facts
  40. </p>

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