← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 927 · 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.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  2. 2.🔗 Which words do you click on?
    <a href="quiz.html">Visit the site</a>
    (a) Visit the site (b) href (c) quiz.html (d) Maths fun
  3. 3.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  4. 4.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
  5. 5.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="350">
    (a) An old fort (b) bus.jpg (c) Our school bus (d) width
  7. 7.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  8. 8.🔗 What does HyperText mean? (a) text in colour (b) text with links (c) secret text (d) very big text
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <h1>Hello, world!
    line 2: <strong>Cricket is fun.</strong>
    line 3: <small>My best friend</small>
    (a) line 3 (b) line 1 (c) line 2
  10. 10.🔗 Where does this link open?
    <a href="maths.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  11. 11.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
  12. 12.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) about.html (b) Contact us (c) contact.html (d) games.html
  13. 13.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  14. 14.True or false: HTML on its own cannot make headings. (a) False (b) True
  15. 15.🔍 One closing tag is missing. Which one?
    <h3>Fun facts</h3>
    <h1>I love mangoes.</h1>
    <p>Hello, world!
    (a) </h3> (b) </i> (c) </h1> (d) </p>
  16. 16.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) Welcome! (c) I like to read. (d) Space Facts
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="300">
    (a) moon.png (b) width (c) The full moon (d) Our school bus
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) The full moon (b) width (c) A happy dog (d) dog.jpg
  19. 19.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  20. 20.True or false: a web browser has an address bar. (a) False (b) True
  21. 21.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
  22. 22.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
  24. 24.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) width (d) src
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    (a) Our school trip (b) My best friend (c) I love mangoes.
  26. 26.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  27. 27.True or false: <ul> is an empty tag. (a) False (b) True
  28. 28.📋 What number does the browser show next to “Jamun”?
    <ol start="7">
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
  29. 29.True or false: HTML on its own can run a game loop. (a) True (b) False
  30. 30.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
  32. 32.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h2> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h5>
  33. 33.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="50">
    (a) cake.jpg (b) Map of India (c) map.png (d) dog.jpg
  34. 34.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  35. 35.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Roses are red<br>Birds sing<br>Kites fly high</p>
  37. 37.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) About us (b) contact.html (c) href (d) Play games
  38. 38.Which of these is a closing tag? (a) </b> (b) <h1> (c) <b> (d) <p>
  39. 39.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  40. 40.🔍 One closing tag is missing. Which one?
    <strong>Rain today
    <u>Hello, world!</u>
    <h2>Our school trip</h2>
    (a) </u> (b) </h2> (c) </small> (d) </strong>

Answer key

  1. bullets
  2. Visit the site
  3. <ol>
  4. 2
  5. on the browser tab
  6. Our school bus
  7. False
  8. text with links
  9. line 1
  10. in a new tab
  11. to leave notes
  12. games.html
  13. a web browser
  14. False
  15. </p>
  16. Space Facts
  17. The full moon
  18. A happy dog
  19. Yes
  20. True
  21. 2
  22. has a closing tag
  23. 2
  24. alt
  25. My best friend
  26. has a closing tag
  27. False
  28. 8
  29. False
  30. a closing tag
  31. 100
  32. <h5>
  33. map.png
  34. in the head
  35. <h6>
  36. 5
  37. Play games
  38. </b>
  39. an opening tag
  40. </strong>

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