← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 505 · 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.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  2. 2.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
  3. 3.True or false: in <img>, alt describes the picture. (a) True (b) False
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="200">
  5. 5.Which of these goes in the body? (a) <style> (b) <title> (c) <img> (d) <link rel="stylesheet">
  6. 6.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  7. 7.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
  8. 8.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) School news (b) href (c) Art corner (d) games.html
  9. 9.🔗 Which address opens when you click this link?
    <a href="contact.html">School news</a>
    (a) maths.html (b) https://example.com (c) School news (d) contact.html
  10. 10.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ul>
  11. 11.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="100">
    (a) Map of India (b) map.png (c) cake.jpg (d) dog.jpg
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
  13. 13.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
    <p>The red kite</p>
    <p>My pets</p>
  14. 14.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to colour it (d) to describe the image
  15. 15.True or false: HTML on its own can add up two numbers. (a) True (b) False
  16. 16.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  17. 17.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
  18. 18.🔍 One closing tag is missing. Which one?
    <em>Fun facts</em>
    <i>The red kite</i>
    <strong>My best friend
    (a) </i> (b) </strong> (c) </em> (d) </b>
  19. 19.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  20. 20.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h2>Fun facts</h2>
    <p>My best friend</p>
  21. 21.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
  22. 22.Which of these is true of a web browser? (a) colours code to help us (b) answers page requests (c) hosts websites online (d) opens web pages for us
  23. 23.Which of these is true of a web browser? (a) turns HTML into a page (b) saves our .html files (c) sends pages over the net (d) hosts websites online
  24. 24.🔍 One closing tag is missing. Which one?
    <small>The red kite</small>
    <strong>My best friend</strong>
    <h2>Cricket is fun.
    (a) </strong> (b) </h2> (c) </small> (d) </p>
  25. 25.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  26. 26.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
  27. 27.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) height (d) width
  28. 28.True or false: <img> has a closing tag. (a) True (b) False
  29. 29.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>The red kite</p>
    <h2>Our school trip</h2>
    <p>Cricket is fun.</p>
  30. 30.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers
  31. 31.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
  32. 32.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a closing tag (d) a comment
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="50">
  34. 34.🔍 One closing tag is missing. Which one?
    <h2>Good morning!</h2>
    <h1>Our school trip
    <em>Fun facts</em>
    (a) </h1> (b) </i> (c) </em> (d) </h2>
  35. 35.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
  36. 36.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
  37. 37.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  38. 38.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  39. 39.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) games.html (b) Visit the site (c) href (d) Maths fun
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) The full moon (b) A happy dog (c) dog.jpg (d) width

Answer key

  1. opens it in a new tab
  2. <li>
  3. True
  4. 200
  5. <img>
  6. an empty tag
  7. 2
  8. Art corner
  9. contact.html
  10. 5
  11. map.png
  12. 1
  13. 4
  14. to describe the image
  15. False
  16. in the body
  17. <a>
  18. </strong>
  19. <ul>
  20. 2
  21. <ol>
  22. opens web pages for us
  23. turns HTML into a page
  24. </h2>
  25. a closing tag
  26. 3
  27. alt
  28. False
  29. 2
  30. bullets
  31. 2
  32. an attribute
  33. 50
  34. </h1>
  35. <h4>
  36. Yes
  37. <ol>
  38. Yes
  39. Visit the site
  40. A happy dog

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