← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 782 · 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 address opens when you click this link?
    <a href="quiz.html">Take the quiz</a>
    (a) quiz.html (b) games.html (c) Take the quiz (d) about.html
  2. 2.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  3. 3.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
  4. 4.🔗 Where does this link open?
    <a href="contact.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  5. 5.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  6. 6.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
  7. 7.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i> (c) <i/> (d) </i>
  9. 9.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="250">
    (a) The full moon (b) width (c) Our school bus (d) moon.png
  10. 10.True or false: in <img>, height sets how tall it is. (a) True (b) False
  11. 11.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  12. 12.True or false: <li> has a closing tag. (a) False (b) True
  13. 13.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h3>? (a) <h2> (b) <h5> (c) <h1> (d) <h3>
  14. 14.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  15. 15.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a slash / (d) a dollar $
  16. 16.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) href (b) games.html (c) School news (d) Art corner
  17. 17.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Stars shine</p>
  18. 18.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    <p>Hello, world!</p>
  19. 19.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <p>Rain today</p>
    (a) I love mangoes. (b) Our school trip (c) Cricket is fun. (d) Rain today
  20. 20.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
  21. 21.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
  22. 22.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  23. 23.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>My pets</p>
    <h2>Good morning!</h2>
    <h2>Cricket is fun.</h2>
    <h2>Good morning!</h2>
    <p>Hello, world!</p>
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <h3>Good morning!
    line 2: <em>Fun facts</em>
    line 3: <h2>Cricket is fun.</h2>
    (a) line 1 (b) line 3 (c) line 2
  25. 25.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <\h3> (c) </h3> (d) <h3>
  26. 26.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h1>? (a) <h3> (b) <h6> (c) <h1> (d) <h2>
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine<br>Rivers flow<br>Sky is blue</p>
  28. 28.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  29. 29.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) https://example.com (b) Contact us (c) About us (d) href
  30. 30.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>Good morning!</h2>
    <h3>Cricket is fun.</h3>
  31. 31.True or false: <ul> shows 1, 2, 3 numbers. (a) False (b) True
  32. 32.Which of these is an opening tag? (a) </p> (b) </li> (c) <p> (d) </body>
  33. 33.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ul>
  34. 34.Which of these has a closing tag? (a) <img> (b) <br> (c) <hr> (d) <p>
  35. 35.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h3>? (a) <h5> (b) <h6> (c) <h1> (d) <h3>
  36. 36.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to load it faster (d) to colour it
  37. 37.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.🔗 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">
  39. 39.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
  40. 40.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag

Answer key

  1. quiz.html
  2. Yes
  3. src
  4. in the same tab
  5. Yes
  6. </h2>
  7. a closing tag
  8. </i>
  9. The full moon
  10. True
  11. bullets
  12. True
  13. <h1>
  14. a closing tag
  15. a slash /
  16. Art corner
  17. 3
  18. 3
  19. Our school trip
  20. <img>
  21. <
  22. in a new tab
  23. 3
  24. line 1
  25. </h3>
  26. <h1>
  27. 4
  28. <ul>
  29. About us
  30. 3
  31. False
  32. <p>
  33. 3
  34. <p>
  35. <h6>
  36. to describe the image
  37. an opening tag
  38. <a href="about.html">
  39. <h1>
  40. has a closing tag

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