← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 12 · 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 is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) <strong/> (d) </strong>
  2. 2.🔍 Which is the odd one out? (a) opens web pages for us (b) sends pages over the net (c) has an address bar (d) turns HTML into a page
  3. 3.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) alt (d) height
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="200">
  5. 5.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
  6. 6.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h6>? (a) <h4> (b) <h1> (c) <h5> (d) <h6>
  7. 7.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Here is my best one. (c) Class 7 Blog (d) All about me
  8. 8.Which of these has a closing tag? (a) <meta> (b) <img> (c) <hr> (d) <title>
  9. 9.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  10. 10.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  11. 11.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Fun facts</p> -->
  12. 12.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes a list (d) makes text bold
  13. 13.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
    (a) bullets (b) numbers
  14. 14.📄 Can HTML on its own make headings? (a) Yes (b) No
  15. 15.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
  16. 16.Which of these goes in the head? (a) <ul> (b) <p> (c) <table> (d) <meta charset="utf-8">
  17. 17.🔗 Where does this link open?
    <a href="art.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  18. 18.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h5>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
  19. 19.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) an attribute (d) a comment
  20. 20.🔗 Where does this link open?
    <a href="art.html">School news</a>
    (a) in a new tab (b) in the same tab
  21. 21.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  22. 22.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h5>? (a) <h3> (b) <h4> (c) <h5> (d) <h6>
  23. 23.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <p>I love mangoes.</p>
    (a) My best friend (b) Hello, world! (c) I love mangoes. (d) Cricket is fun.
  24. 24.Which of these is an opening tag? (a) <li> (b) </li> (c) </p> (d) </b>
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Stars shine</p>
  26. 26.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    (a) My best friend (b) Hello, world! (c) The red kite (d) I love mangoes.
  27. 27.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <title> (d) <a>
  28. 28.🌍 Which program shows a web page to us? (a) a web browser (b) a calculator (c) a music player (d) a paint program
  29. 29.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
  30. 30.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  31. 31.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) height (d) width
  32. 32.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h1>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
  33. 33.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
  34. 34.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) Contact us (b) href (c) About us (d) contact.html
  35. 35.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) moon.png (b) dog.jpg (c) Birthday cake (d) cake.jpg
  36. 36.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
  37. 37.True or false: HTML on its own cannot make a form. (a) False (b) True
  38. 38.True or false: <title> goes in the body. (a) False (b) True
  39. 39.True or false: HTML on its own can make a form. (a) False (b) True
  40. 40.True or false: in <img>, alt is read by screen readers. (a) False (b) True

Answer key

  1. </strong>
  2. sends pages over the net
  3. src
  4. 200
  5. <h6>
  6. <h6>
  7. Class 7 Blog
  8. <title>
  9. an opening tag
  10. Yes
  11. 1
  12. starts a new line
  13. numbers
  14. Yes
  15. 2
  16. <meta charset="utf-8">
  17. in a new tab
  18. <h1>
  19. an attribute
  20. in the same tab
  21. Yes
  22. <h6>
  23. Cricket is fun.
  24. <li>
  25. 3
  26. The red kite
  27. <a>
  28. a web browser
  29. 6
  30. <h1>
  31. width
  32. <h1>
  33. <h1>
  34. About us
  35. cake.jpg
  36. </small>
  37. False
  38. False
  39. True
  40. True

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