← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 742 · 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 code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
  2. 2.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
  3. 3.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
  4. 4.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
  5. 5.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) news.html (b) art.html (c) maths.html (d) Play games
  6. 6.🔠 Are headings shown in bold by default? (a) No (b) Yes
  7. 7.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h3>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
  8. 8.🔗 Which address opens when you click this link?
    <a href="quiz.html">Art corner</a>
    (a) about.html (b) games.html (c) Art corner (d) quiz.html
  9. 9.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) My drawings (c) body (d) Cricket Club
  10. 10.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  11. 11.Which of these is a closing tag? (a) </h1> (b) <li> (c) <p> (d) <body>
  12. 12.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  13. 13.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Rain today</p>
  15. 15.📋 What number does the browser show next to “Mango”?
    <ol start="5">
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  16. 16.🔍 One closing tag is missing. Which one?
    <i>Rain today
    <b>My pets</b>
    <h3>I love mangoes.</h3>
    (a) </h3> (b) </b> (c) </strong> (d) </i>
  17. 17.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Papaya</li>
    </ul>
    (a) bullets (b) numbers
  18. 18.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
  19. 19.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h3> or <h4>? (a) <h6> (b) <h4> (c) <h5> (d) <h3>
  20. 20.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Rain today</p>
    <h2>I love mangoes.</h2>
    <h2>The red kite</h2>
    <p>Cricket is fun.</p>
  21. 21.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>My pets</h4>
    <h2>Hello, world!</h2>
    <h4>Hello, world!</h4>
    <h2>Our school trip</h2>
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
  23. 23.🔍 One closing tag is missing. Which one?
    <p>Good morning!</p>
    <strong>Fun facts</strong>
    <small>I love mangoes.
    (a) </strong> (b) </p> (c) </small> (d) </h3>
  24. 24.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="100">
  26. 26.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  27. 27.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h4>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>
  28. 28.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    (a) Hello, world! (b) Rain today (c) Cricket is fun.
  29. 29.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
  30. 30.📄 Where does the text of <title> appear? (a) on the browser tab (b) in a big heading (c) at the bottom (d) nowhere
  31. 31.True or false: <ul> is an ordered list. (a) False (b) True
  32. 32.🔗 Where does this link open?
    <a href="news.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  33. 33.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  34. 34.True or false: a code editor opens web pages for us. (a) True (b) False
  35. 35.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) element (d) editor
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
  37. 37.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
  38. 38.Which of these has a closing tag? (a) <ul> (b) <br> (c) <hr> (d) <meta>
  39. 39.🔗 Which address opens when you click this link?
    <a href="about.html">About us</a>
    (a) about.html (b) About us (c) https://example.com (d) contact.html
  40. 40.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>

Answer key

  1. <a href="about.html">
  2. opens it in a new tab
  3. -->
  4. to describe the image
  5. maths.html
  6. Yes
  7. <h1>
  8. quiz.html
  9. My drawings
  10. a closing tag
  11. </h1>
  12. bullets
  13. <h5>
  14. 3
  15. 6
  16. </i>
  17. bullets
  18. <h1>
  19. <h6>
  20. 3
  21. 5
  22. 1
  23. </small>
  24. <li>
  25. 100
  26. True
  27. <h1>
  28. Rain today
  29. <!--
  30. on the browser tab
  31. False
  32. in a new tab
  33. Yes
  34. False
  35. element
  36. 2
  37. a line across the page
  38. <ul>
  39. about.html
  40. <ul>

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