← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 963 · 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 of these is an opening tag? (a) </li> (b) <b> (c) </p> (d) </h1>
  2. 2.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 3 (d) 4
  3. 3.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) src (d) width
  4. 4.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
  5. 5.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a slash / (d) a dot .
  6. 6.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
  7. 7.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
  8. 8.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  9. 9.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Home Text (c) Hot Tags (d) High Tech
  10. 10.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <hr> (d) <ul>
  11. 11.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
  12. 12.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
  13. 13.🔍 One closing tag is missing. Which one?
    <small>Rain today</small>
    <i>Good morning!
    <strong>My best friend</strong>
    (a) </i> (b) </strong> (c) </em> (d) </small>
  14. 14.🔗 Where does this link open?
    <a href="news.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  15. 15.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
  16. 16.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  17. 17.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow</p>
  18. 18.Which of these is an opening tag? (a) </title> (b) </h1> (c) </li> (d) <title>
  19. 19.🔗 Which address opens when you click this link?
    <a href="news.html">Contact us</a>
    (a) quiz.html (b) games.html (c) Contact us (d) news.html
  20. 20.🔗 Where does this link open?
    <a href="contact.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  21. 21.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
  22. 22.🔍 One closing tag is missing. Which one?
    <i>I love mangoes.
    <b>My best friend</b>
    <strong>Hello, world!</strong>
    (a) </strong> (b) </i> (c) </b> (d) </h1>
  23. 23.True or false: <li> is an ordered list. (a) True (b) False
  24. 24.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) https://example.com (b) href (c) Contact us (d) Visit the site
  25. 25.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  26. 26.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h4> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <p>Rain today</p>
    <p>Good morning!</p>
    <p>Hello, world!</p>
  28. 28.Which of these is a closing tag? (a) <li> (b) <body> (c) <title> (d) </li>
  29. 29.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <\em> (c) </em> (d) <em>
  30. 30.🧱 HTML gives a web page its ___. (a) speed (b) structure (c) sound (d) colours
  31. 31.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Planets (b) index.html (c) Art Gallery (d) Try this poha.
  32. 32.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
  33. 33.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
  34. 34.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Cricket Club (b) index.html (c) Easy snacks (d) Here is my best one.
  35. 35.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  36. 36.📋 What number does the browser show next to “Banana”?
    <ol start="8">
      <li>Mango</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  37. 37.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ol>
  38. 38.🔍 Which is the odd one out? (a) shows line numbers (b) turns HTML into a page (c) shows pages from the web (d) has an address bar
  39. 39.🔗 Which words do you click on?
    <a href="art.html">Maths fun</a>
    (a) href (b) art.html (c) Art corner (d) Maths fun
  40. 40.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //

Answer key

  1. <b>
  2. 6
  3. height
  4. <!--
  5. a slash /
  6. <img>
  7. element
  8. in the body
  9. HyperText
  10. <ul>
  11. the body
  12. <ol>
  13. </i>
  14. in the same tab
  15. 2
  16. No
  17. 2
  18. <title>
  19. news.html
  20. in a new tab
  21. <ol>
  22. </i>
  23. False
  24. Contact us
  25. bullets
  26. <h5>
  27. 4
  28. </li>
  29. </em>
  30. structure
  31. Art Gallery
  32. on the browser tab
  33. 2
  34. Cricket Club
  35. href
  36. 9
  37. 4
  38. shows line numbers
  39. Maths fun
  40. -->

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