← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 959 · 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 of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
  2. 2.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) dog.jpg (b) width (c) A happy dog (d) The full moon
  4. 4.Which of these is an opening tag? (a) </h1> (b) </body> (c) <p> (d) </title>
  5. 5.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
  6. 6.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ul>
  7. 7.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <h2>My pets</h2>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <h2>I love mangoes.</h2>
  8. 8.True or false: a web server sends pages over the net. (a) True (b) False
  9. 9.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  10. 10.Which of these is an opening tag? (a) </p> (b) <b> (c) </b> (d) </li>
  11. 11.🔗 Which words do you click on?
    <a href="news.html">Art corner</a>
    (a) Art corner (b) School news (c) href (d) news.html
  12. 12.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
  13. 13.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
  14. 14.True or false: in <img>, alt sets how tall it is. (a) False (b) True
  15. 15.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) width (b) tiger.jpg (c) A red kite (d) A tiger asleep
  17. 17.🔍 One closing tag is missing. Which one?
    <u>Hello, world!</u>
    <h1>Fun facts
    <strong>Good morning!</strong>
    (a) </u> (b) </strong> (c) </p> (d) </h1>
  18. 18.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
  19. 19.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) A tiger asleep (b) tiger.jpg (c) kite.png (d) map.png
  20. 20.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
  21. 21.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    (a) Fun facts (b) My pets (c) Cricket is fun. (d) My best friend
  22. 22.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
  23. 23.True or false: a web browser is where we type code. (a) False (b) True
  24. 24.Which of these is an opening tag? (a) </body> (b) </p> (c) <title> (d) </h1>
  25. 25.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) height (d) width
  26. 26.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
  27. 27.Which of these is a closing tag? (a) <title> (b) <body> (c) </b> (d) <p>
  28. 28.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Mouse (c) Machine (d) Modern
  29. 29.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  30. 30.🔤 In “HTML”, what does the L stand for? (a) Language (b) Link (c) Laptop (d) Line
  31. 31.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) href (b) Visit the site (c) about.html (d) Contact us
  32. 32.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  33. 33.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) Welcome! (c) index.html (d) Riya’s Recipes
  34. 34.Which of these goes in the body? (a) <title> (b) <a> (c) <meta charset="utf-8"> (d) <style>
  35. 35.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) has an address bar (d) shows line numbers
  36. 36.🔍 Which line is missing its closing tag?
    line 1: <small>The red kite</small>
    line 2: <h2>Rain today
    line 3: <em>My pets</em>
    (a) line 3 (b) line 1 (c) line 2
  37. 37.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) art.html (b) https://example.com (c) maths.html (d) Contact us
  38. 38.🔗 Where does this link open?
    <a href="news.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  39. 39.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
  40. 40.🔍 One closing tag is missing. Which one?
    <small>Rain today</small>
    <h2>My best friend
    <em>My pets</em>
    (a) </em> (b) </h2> (c) </strong> (d) </small>

Answer key

  1. alt
  2. <ol>
  3. A happy dog
  4. <p>
  5. a code editor
  6. 5
  7. 4
  8. True
  9. in the head
  10. <b>
  11. Art corner
  12. <img>
  13. <h6>
  14. False
  15. No
  16. A tiger asleep
  17. </h1>
  18. <h1>
  19. tiger.jpg
  20. 3
  21. My pets
  22. a slash /
  23. False
  24. <title>
  25. alt
  26. 6
  27. </b>
  28. Markup
  29. numbers
  30. Language
  31. Contact us
  32. No
  33. Riya’s Recipes
  34. <a>
  35. has an address bar
  36. line 2
  37. https://example.com
  38. in the same tab
  39. -->
  40. </h2>

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