← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 898 · 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> describes the picture? (a) width (b) height (c) alt (d) src
  2. 2.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  3. 3.True or false: in <img>, width names the picture file. (a) True (b) False
  4. 4.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  5. 5.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  6. 6.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  7. 7.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  8. 8.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Fun facts</h2>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
  9. 9.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  10. 10.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
  11. 11.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) Our school bus (b) tiger.jpg (c) bus.jpg (d) fort.jpg
  12. 12.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.True or false: <h1> is an empty tag. (a) True (b) False
  14. 14.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
    (a) I love mangoes. (b) Good morning! (c) Hello, world! (d) Fun facts
  15. 15.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
  16. 16.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  17. 17.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h2>The red kite</h2>
    <p>Our school trip</p>
    <h4>Fun facts</h4>
  18. 18.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
  19. 19.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) <\h3> (d) </h3>
  20. 20.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) href (b) games.html (c) Play games (d) About us
  21. 21.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 3 (d) 10
  22. 22.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <h2> (d) <\h2>
  23. 23.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  24. 24.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) </strong> (c) <\strong> (d) <strong>
  25. 25.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Our school trip</p>
    <p>Fun facts</p>
  26. 26.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) { (d) (
  27. 27.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    (a) I love mangoes. (b) Fun facts (c) Good morning! (d) Hello, world!
  28. 28.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  29. 29.Which of these is true of a web browser? (a) sends pages over the net (b) hosts websites online (c) shows pages from the web (d) colours code to help us
  30. 30.Which of these is an empty tag? (a) <p> (b) <b> (c) <br> (d) <title>
  31. 31.Which of these is an opening tag? (a) <h1> (b) </li> (c) </body> (d) </h1>
  32. 32.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
  33. 33.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h3>? (a) <h2> (b) <h4> (c) <h3> (d) <h6>
  34. 34.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
  35. 35.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
  36. 36.True or false: <li> is an ordered list. (a) False (b) True
  37. 37.Which of these is an opening tag? (a) </title> (b) </p> (c) </body> (d) <b>
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <h3>My pets
    line 2: <h1>I love mangoes.</h1>
    line 3: <h2>Rain today</h2>
    (a) line 2 (b) line 3 (c) line 1
  39. 39.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>

Answer key

  1. alt
  2. an empty tag
  3. False
  4. bullets
  5. False
  6. in the body
  7. True
  8. 5
  9. in the body
  10. <h1>
  11. bus.jpg
  12. a closing tag
  13. False
  14. I love mangoes.
  15. alt
  16. <ol>
  17. 3
  18. a web server
  19. </h3>
  20. Play games
  21. 6
  22. </h2>
  23. 3
  24. </strong>
  25. 1
  26. <
  27. I love mangoes.
  28. No
  29. shows pages from the web
  30. <br>
  31. <h1>
  32. width
  33. <h2>
  34. <a>
  35. -->
  36. False
  37. <b>
  38. line 1
  39. in the body
  40. <ul>

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