← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 556 · 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 heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h1>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
  2. 2.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>My best friend</p>
    <p>My best friend</p>
    <p>My pets</p>
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <small>Cricket is fun.
    line 2: <h1>Our school trip</h1>
    line 3: <em>The red kite</em>
    (a) line 1 (b) line 2 (c) line 3
  4. 4.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    (a) Good morning! (b) Fun facts (c) Cricket is fun. (d) I love mangoes.
  5. 5.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
  6. 6.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) About us (b) href (c) contact.html (d) Play games
  7. 7.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) Visit the site (b) href (c) games.html (d) Contact us
  8. 8.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  9. 9.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Rivers flow</p>
  11. 11.True or false: <li> lists things in any order. (a) True (b) False
  12. 12.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) height (c) alt (d) src
  13. 13.True or false: <hr> has a closing tag. (a) False (b) True
  14. 14.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
  15. 15.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) My drawings (b) Riya’s Recipes (c) Here is my best one. (d) index.html
  16. 16.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) https://example.com (b) maths.html (c) Play games (d) contact.html
  17. 17.True or false: <ul> lists steps in order. (a) True (b) False
  18. 18.True or false: a code editor shows line numbers. (a) True (b) False
  19. 19.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </html> (c) <head> (d) </head>
  20. 20.True or false: in <img>, src describes the picture. (a) True (b) False
  21. 21.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    (a) Our school trip (b) Cricket is fun. (c) Hello, world!
  22. 22.🔍 One closing tag is missing. Which one?
    <u>Fun facts
    <h1>Our school trip</h1>
    <h2>Good morning!</h2>
    (a) </h1> (b) </h2> (c) </em> (d) </u>
  23. 23.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
  24. 24.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    (a) Our school trip (b) Rain today (c) My pets
  25. 25.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h2>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
  26. 26.Which of these has a closing tag? (a) <img> (b) <b> (c) <meta> (d) <br>
  27. 27.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
  29. 29.🏷️ Which is the closing tag for <i>? (a) </i> (b) <i/> (c) <i> (d) <\i>
  30. 30.True or false: <li> shows bullet points. (a) False (b) True
  31. 31.True or false: a web server sends pages over the net. (a) True (b) False
  32. 32.Which of these is an opening tag? (a) </b> (b) </h1> (c) </li> (d) <title>
  33. 33.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  34. 34.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    (a) Our school trip (b) Fun facts (c) Cricket is fun.
  35. 35.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  36. 36.True or false: <li> is an empty tag. (a) True (b) False
  37. 37.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  38. 38.Which of these goes in the body? (a) <title> (b) <h1> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
  39. 39.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <p>The red kite</p>
    <p>I love mangoes.</p>
    (a) Fun facts (b) Cricket is fun. (c) I love mangoes. (d) The red kite
  40. 40.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>

Answer key

  1. <h5>
  2. 1
  3. line 1
  4. I love mangoes.
  5. -->
  6. Play games
  7. Contact us
  8. True
  9. No
  10. 3
  11. False
  12. alt
  13. False
  14. a code editor
  15. Riya’s Recipes
  16. contact.html
  17. False
  18. True
  19. </html>
  20. False
  21. Hello, world!
  22. </u>
  23. <h6>
  24. Rain today
  25. <h5>
  26. <b>
  27. in the body
  28. 1
  29. </i>
  30. False
  31. True
  32. <title>
  33. <!--
  34. Our school trip
  35. Yes
  36. False
  37. numbers
  38. <h1>
  39. Cricket is fun.
  40. <img>

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