← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 226 · 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.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Good morning!</h2>
    <h2>Our school trip</h2>
  2. 2.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) dog.jpg (b) moon.png (c) cake.jpg (d) Birthday cake
  3. 3.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) Art corner (b) about.html (c) href (d) Maths fun
  4. 4.📝 What do we need to write HTML? (a) a printer (b) a paintbrush (c) a plain text editor (d) a microphone
  5. 5.True or false: HTML on its own can make links to pages. (a) False (b) True
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) tiger.jpg (b) A tiger asleep (c) A red kite (d) width
  7. 7.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) contact.html (b) About us (c) about.html (d) games.html
  8. 8.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red<br>Sky is blue<br>Birds sing<br>Kites fly high</p>
  10. 10.Which of these goes in the head? (a) <h1> (b) <link rel="stylesheet"> (c) <p> (d) <img>
  11. 11.Which of these is an empty tag? (a) <title> (b) <h1> (c) <br> (d) <b>
  12. 12.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
  13. 13.Which of these is a closing tag? (a) <body> (b) </b> (c) <title> (d) <h1>
  14. 14.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h6> or <h2>? (a) <h2> (b) <h4> (c) <h6> (d) <h3>
  15. 15.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
  16. 16.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
  17. 17.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>Fun facts</p>
    (a) Rain today (b) Fun facts (c) Our school trip (d) Hello, world!
  18. 18.Which of these has a closing tag? (a) <img> (b) <hr> (c) <title> (d) <br>
  19. 19.🔗 Where does this link open?
    <a href="about.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  20. 20.📋 What number does the browser show next to “Banana”?
    <ol start="5">
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <p>My best friend</p>
  22. 22.🏷️ HTML marks up text using ___. (a) pixels (b) tags (c) wires (d) keys
  23. 23.🔍 Which is the odd one out? (a) opens web pages for us (b) turns HTML into a page (c) has an address bar (d) is where we type code
  24. 24.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <p> (d) <h6>
  25. 25.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>Fun facts</h2>
    <h4>Our school trip</h4>
    <p>I love mangoes.</p>
  26. 26.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) height (d) src
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) A red kite (b) tiger.jpg (c) A tiger asleep (d) width
  28. 28.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ul>
  29. 29.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="400">
    (a) The full moon (b) fort.jpg (c) moon.png (d) bus.jpg
  30. 30.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
  31. 31.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src
  32. 32.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  33. 33.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ul>
  34. 34.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) Art corner (b) School news (c) contact.html (d) href
  35. 35.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  36. 36.True or false: <li> is an empty tag. (a) False (b) True
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <i>Cricket is fun.</i>
    line 2: <b>Our school trip</b>
    line 3: <small>Hello, world!
    (a) line 3 (b) line 1 (c) line 2
  38. 38.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  39. 39.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>My best friend</p> -->
  40. 40.True or false: HTML on its own can run a game loop. (a) False (b) True

Answer key

  1. 1
  2. cake.jpg
  3. Maths fun
  4. a plain text editor
  5. True
  6. A tiger asleep
  7. games.html
  8. 6
  9. 5
  10. <link rel="stylesheet">
  11. <br>
  12. <li>
  13. </b>
  14. <h6>
  15. alt
  16. <h6>
  17. Our school trip
  18. <title>
  19. in the same tab
  20. 10
  21. 2
  22. tags
  23. is where we type code
  24. <h1>
  25. 3
  26. alt
  27. A tiger asleep
  28. 6
  29. moon.png
  30. <ol>
  31. src
  32. No
  33. 5
  34. Art corner
  35. 3
  36. False
  37. line 3
  38. has a closing tag
  39. 2
  40. False

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