← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 657 · 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 one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
  2. 2.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  3. 3.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) src (d) alt
  4. 4.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) </h1> (d) <h1/>
  5. 5.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine<br>Roses are red</p>
  7. 7.🔗 Which address opens when you click this link?
    <a href="quiz.html">About us</a>
    (a) quiz.html (b) games.html (c) about.html (d) About us
  8. 8.🔍 One closing tag is missing. Which one?
    <em>My best friend
    <u>The red kite</u>
    <h2>I love mangoes.</h2>
    (a) </u> (b) </em> (c) </small> (d) </h2>
  9. 9.🔗 Which words do you click on?
    <a href="news.html">School news</a>
    (a) School news (b) Take the quiz (c) href (d) news.html
  10. 10.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) https://example.com (b) Visit the site (c) contact.html (d) maths.html
  11. 11.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) width (d) alt
  12. 12.True or false: <li> is an empty tag. (a) False (b) True
  13. 13.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  14. 14.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to describe the image (d) to make it bigger
  15. 15.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h6>? (a) <h3> (b) <h6> (c) <h1> (d) <h4>
  16. 16.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
  17. 17.🔍 One closing tag is missing. Which one?
    <b>My best friend
    <h2>Cricket is fun.</h2>
    <strong>Hello, world!</strong>
    (a) </h2> (b) </strong> (c) </b> (d) </i>
  18. 18.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
  19. 19.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  20. 20.🔍 One closing tag is missing. Which one?
    <em>I love mangoes.</em>
    <i>The red kite
    <p>Good morning!</p>
    (a) </h2> (b) </em> (c) </i> (d) </p>
  21. 21.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h4>? (a) <h2> (b) <h1> (c) <h5> (d) <h4>
  22. 22.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
  23. 23.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>My pets</h2>
    <h2>Fun facts</h2>
    <p>My pets</p>
    <h2>My pets</h2>
    <p>Rain today</p>
  24. 24.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  25. 25.True or false: <h1> is an empty tag. (a) True (b) False
  26. 26.True or false: <style> goes in the head. (a) True (b) False
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) dog.jpg (b) width (c) The full moon (d) A happy dog
  29. 29.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>My pets</h3>
    <p>Cricket is fun.</p>
  30. 30.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    (a) I love mangoes. (b) Good morning! (c) Rain today
  31. 31.Which of these has a closing tag? (a) <img> (b) <hr> (c) <br> (d) <ul>
  32. 32.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
  33. 33.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
  34. 34.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a picture (d) a table
  35. 35.True or false: HTML on its own cannot pick a random number. (a) False (b) True
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    <p>Our school trip</p>
    (a) I love mangoes. (b) Fun facts (c) Our school trip
  37. 37.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) A tiger asleep (b) map.png (c) tiger.jpg (d) kite.png
  38. 38.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) fort.jpg (b) bus.jpg (c) The full moon (d) moon.png
  39. 39.📄 Can HTML on its own make a form? (a) No (b) Yes
  40. 40.Which of these is a closing tag? (a) <h1> (b) <title> (c) </b> (d) <body>

Answer key

  1. a web browser
  2. has a closing tag
  3. width
  4. </h1>
  5. 4
  6. 3
  7. quiz.html
  8. </em>
  9. School news
  10. contact.html
  11. height
  12. False
  13. in a new tab
  14. to describe the image
  15. <h6>
  16. element
  17. </b>
  18. <h1>
  19. <ol>
  20. </i>
  21. <h1>
  22. <a href="about.html">
  23. 3
  24. numbers
  25. False
  26. True
  27. 3
  28. A happy dog
  29. 2
  30. Good morning!
  31. <ul>
  32. <img>
  33. 4
  34. a line across the page
  35. True
  36. I love mangoes.
  37. tiger.jpg
  38. moon.png
  39. Yes
  40. </b>

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