← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 687 · 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 line is missing its closing tag?
    line 1: <h3>The red kite
    line 2: <h2>Rain today</h2>
    line 3: <em>I love mangoes.</em>
    (a) line 1 (b) line 2 (c) line 3
  2. 2.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h1>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>
  3. 3.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
  5. 5.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>Rain today</p>
    (a) Good morning! (b) Rain today (c) The red kite (d) Fun facts
  6. 6.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  7. 7.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  8. 8.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
  9. 9.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ul>
  10. 10.🔗 Where does this link open?
    <a href="about.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  11. 11.🔠 Are headings shown in bold by default? (a) No (b) Yes
  12. 12.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="50">
    (a) cake.jpg (b) Map of India (c) dog.jpg (d) map.png
  13. 13.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="400">
  15. 15.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  16. 16.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</body>”? (a) <!DOCTYPE html> (b) </body>
  17. 17.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) Maths fun (b) href (c) Visit the site (d) contact.html
  18. 18.📝 What does <p> make? (a) a table (b) a paragraph (c) a picture (d) a link
  19. 19.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <h4>Cricket is fun.</h4>
    <h3>Our school trip</h3>
  20. 20.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
  21. 21.True or false: <h1> goes in the head. (a) True (b) False
  22. 22.True or false: in <img>, width names the picture file. (a) False (b) True
  23. 23.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) href (b) https://example.com (c) Play games (d) Take the quiz
  24. 24.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  25. 25.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  26. 26.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  27. 27.Which of these has a closing tag? (a) <input> (b) <meta> (c) <br> (d) <title>
  28. 28.📋 What number does the browser show next to “Guava”?
    <ol start="6">
      <li>Banana</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  29. 29.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
  30. 30.True or false: <br> has a closing tag. (a) False (b) True
  31. 31.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  32. 32.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  33. 33.🔗 Which address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) maths.html (b) Contact us (c) news.html (d) art.html
  34. 34.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
  35. 35.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h6>? (a) <h3> (b) <h1> (c) <h6> (d) <h4>
  36. 36.Which of these is a closing tag? (a) <title> (b) <p> (c) </h1> (d) <b>
  37. 37.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  38. 38.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
  39. 39.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
  40. 40.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h6> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>

Answer key

  1. line 1
  2. <h4>
  3. the body
  4. 1
  5. The red kite
  6. <h1>
  7. has a closing tag
  8. <h6>
  9. 6
  10. in the same tab
  11. Yes
  12. map.png
  13. -->
  14. 400
  15. has a closing tag
  16. <!DOCTYPE html>
  17. Visit the site
  18. a paragraph
  19. 3
  20. href
  21. False
  22. False
  23. Take the quiz
  24. True
  25. a web browser
  26. an opening tag
  27. <title>
  28. 7
  29. to leave notes
  30. False
  31. Yes
  32. in the head
  33. maths.html
  34. 6
  35. <h6>
  36. </h1>
  37. 6
  38. 4
  39. Language
  40. <h6>

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