← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 438 · 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 attribute holds the address of a link? (a) src (b) href (c) id (d) alt
  2. 2.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    (a) Our school trip (b) Rain today (c) The red kite
  3. 3.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Banana</li>
    </ul>
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="150">
  5. 5.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Our school trip</p>
    <h2>My best friend</h2>
  6. 6.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <h1> (d) <meta charset="utf-8">
  7. 7.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="50">
    (a) A red kite (b) kite.png (c) width (d) Map of India
  8. 8.💬 How does an HTML comment end? (a) */ (b) --> (c) >> (d) //
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing</p>
  10. 10.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) body (c) Art Gallery (d) All about me
  11. 11.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="200">
    (a) tiger.jpg (b) Our school bus (c) fort.jpg (d) bus.jpg
  12. 12.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.True or false: <style> goes in the body. (a) False (b) True
  14. 14.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
    (a) Our school trip (b) Fun facts (c) Cricket is fun.
  15. 15.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Orange</li>
    </ul>
  16. 16.True or false: <ul> goes in the head. (a) True (b) False
  17. 17.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  18. 18.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!</h2>
    line 2: <h3>Cricket is fun.
    line 3: <b>Fun facts</b>
    (a) line 1 (b) line 3 (c) line 2
  19. 19.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  20. 20.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  21. 21.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) maths.html (b) art.html (c) About us (d) https://example.com
  22. 22.True or false: in <img>, src shows if the image fails. (a) False (b) True
  23. 23.Which of these is an opening tag? (a) </p> (b) </body> (c) </h1> (d) <body>
  24. 24.🔗 Which address opens when you click this link?
    <a href="contact.html">About us</a>
    (a) contact.html (b) maths.html (c) https://example.com (d) About us
  25. 25.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
  26. 26.🔠 Are headings shown in bold by default? (a) No (b) Yes
  27. 27.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="250">
  29. 29.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) tags (d) wires
  30. 30.Which of these is a closing tag? (a) <p> (b) <title> (c) <h1> (d) </h1>
  31. 31.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  32. 32.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
  33. 33.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  34. 34.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
  35. 35.Which of these is a closing tag? (a) <li> (b) <h1> (c) <p> (d) </title>
  36. 36.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="300">
    (a) cake.jpg (b) map.png (c) kite.png (d) A red kite
  37. 37.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) nowhere (d) on the browser tab
  38. 38.True or false: <input> is an empty tag. (a) True (b) False
  39. 39.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  40. 40.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h6> (d) <h3>

Answer key

  1. href
  2. Rain today
  3. 4
  4. 150
  5. 2
  6. <h1>
  7. A red kite
  8. -->
  9. 2
  10. All about me
  11. bus.jpg
  12. an opening tag
  13. False
  14. Fun facts
  15. 2
  16. False
  17. has a closing tag
  18. line 2
  19. a code editor
  20. an opening tag
  21. https://example.com
  22. False
  23. <body>
  24. contact.html
  25. to describe the image
  26. Yes
  27. bullets
  28. 250
  29. tags
  30. </h1>
  31. Yes
  32. to leave notes
  33. in the body
  34. a web browser
  35. </title>
  36. kite.png
  37. on the browser tab
  38. True
  39. an empty tag
  40. <h6>

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