← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 977 · 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.🔢 In a basic web page file, which comes LAST? (a) </head> (b) <body> (c) </html> (d) </body>
  2. 2.🔠 Are headings shown in bold by default? (a) No (b) Yes
  3. 3.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  4. 4.True or false: in <img>, width sets how wide it is. (a) False (b) True
  5. 5.🌍 Which program shows a web page to us? (a) a paint program (b) a music player (c) a web browser (d) a calculator
  6. 6.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>My best friend</h2>
    <h2>I love mangoes.</h2>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
  7. 7.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  8. 8.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    <p>Good morning!</p>
    (a) My pets (b) Rain today (c) Good morning! (d) I love mangoes.
  9. 9.🔗 Where does this link open?
    <a href="art.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  10. 10.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  11. 11.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  12. 12.Which of these goes in the body? (a) <style> (b) <title> (c) <meta charset="utf-8"> (d) <a>
  13. 13.💬 How does an HTML comment end? (a) --> (b) >> (c) // (d) */
  14. 14.True or false: <ol> lists things in any order. (a) False (b) True
  15. 15.Which of these is a closing tag? (a) <li> (b) <h1> (c) </b> (d) <p>
  16. 16.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  17. 17.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Rain today</p>
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    (a) My pets (b) Our school trip (c) Rain today (d) My best friend
  18. 18.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    (a) Fun facts (b) Hello, world! (c) My pets (d) I love mangoes.
  19. 19.True or false: <li> goes inside ul or ol. (a) False (b) True
  20. 20.True or false: <li> shows bullet points. (a) False (b) True
  21. 21.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h2>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
  22. 22.True or false: in <img>, width names the picture file. (a) True (b) False
  23. 23.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) Contact us (b) About us (c) https://example.com (d) href
  24. 24.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
  25. 25.True or false: <b> has a closing tag. (a) False (b) True
  26. 26.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  27. 27.🔍 One closing tag is missing. Which one?
    <b>The red kite</b>
    <strong>My best friend</strong>
    <h1>My pets
    (a) </strong> (b) </h1> (c) </h2> (d) </b>
  28. 28.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Fun facts</p> -->
  29. 29.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Mango</li>
    </ul>
  30. 30.True or false: a code editor has an address bar. (a) False (b) True
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
  32. 32.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
  33. 33.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
  34. 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  35. 35.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="50">
  36. 36.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
  37. 37.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) Contact us (b) href (c) Visit the site (d) maths.html
  38. 38.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) width (b) kite.png (c) A red kite (d) Map of India
  40. 40.📋 What number does the browser show next to “Jamun”?
    <ol start="7">
      <li>Banana</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>

Answer key

  1. </html>
  2. Yes
  3. an empty tag
  4. True
  5. a web browser
  6. 3
  7. an opening tag
  8. I love mangoes.
  9. in a new tab
  10. <a>
  11. <ol>
  12. <a>
  13. -->
  14. False
  15. </b>
  16. No
  17. My best friend
  18. Fun facts
  19. True
  20. False
  21. <h5>
  22. False
  23. About us
  24. 2
  25. True
  26. 4
  27. </h1>
  28. 1
  29. 5
  30. False
  31. 2
  32. <h1>
  33. <!DOCTYPE html>
  34. <a href="about.html">
  35. 50
  36. as one space
  37. Contact us
  38. 2
  39. A red kite
  40. 10

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