← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 182 · 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.True or false: in <img>, height is read by screen readers. (a) False (b) True
  2. 2.True or false: <input> has a closing tag. (a) False (b) True
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red<br>Rivers flow<br>Stars shine</p>
  4. 4.📄 Can HTML on its own make a form? (a) Yes (b) No
  5. 5.True or false: a code editor opens web pages for us. (a) False (b) True
  6. 6.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) alt (d) height
  7. 7.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
    (a) numbers (b) bullets
  8. 8.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to load it faster (d) to colour it
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine<br>Roses are red</p>
  10. 10.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
  11. 11.📋 What number does the browser show next to “Banana”?
    <ol start="2">
      <li>Litchi</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="100">
    (a) A tiger asleep (b) width (c) fort.jpg (d) An old fort
  13. 13.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Orange</li>
    </ul>
    (a) bullets (b) numbers
  14. 14.🔗 Which address opens when you click this link?
    <a href="quiz.html">Visit the site</a>
    (a) about.html (b) Visit the site (c) games.html (d) quiz.html
  15. 15.Which of these goes in the head? (a) <h1> (b) <link rel="stylesheet"> (c) <ul> (d) <img>
  16. 16.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
  17. 17.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
  18. 18.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <b>Cricket is fun.</b>
    line 2: <h2>The red kite</h2>
    line 3: <h1>My best friend
    (a) line 2 (b) line 1 (c) line 3
  20. 20.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>
  21. 21.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  22. 22.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  23. 23.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) maths.html (b) https://example.com (c) art.html (d) About us
  25. 25.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
  26. 26.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) href (b) contact.html (c) Contact us (d) About us
  27. 27.True or false: <li> is an ordered list. (a) False (b) True
  28. 28.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) bus.jpg (b) moon.png (c) The full moon (d) fort.jpg
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
  30. 30.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  31. 31.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) </html> (b) <html>
  32. 32.📋 What number does the browser show next to “Litchi”?
    <ol start="6">
      <li>Grapes</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  33. 33.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) Birthday cake (b) cake.jpg (c) dog.jpg (d) moon.png
  34. 34.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Banana</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  35. 35.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a new line (d) as a dot
  36. 36.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="200">
    (a) cake.jpg (b) dog.jpg (c) Map of India (d) map.png
  37. 37.🔠 Are headings shown in bold by default? (a) No (b) Yes
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
  39. 39.True or false: a web browser shows pages from the web. (a) True (b) False
  40. 40.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <style> (d) <h1>

Answer key

  1. False
  2. False
  3. 4
  4. Yes
  5. False
  6. alt
  7. bullets
  8. to describe the image
  9. 3
  10. href
  11. 5
  12. An old fort
  13. bullets
  14. quiz.html
  15. <link rel="stylesheet">
  16. 1
  17. a web browser
  18. 2
  19. line 3
  20. <ol>
  21. an empty tag
  22. <ol>
  23. in the head
  24. https://example.com
  25. <
  26. About us
  27. False
  28. moon.png
  29. 1
  30. 5
  31. <html>
  32. 8
  33. cake.jpg
  34. 3
  35. as one space
  36. map.png
  37. Yes
  38. 2
  39. True
  40. <h1>

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