← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 38 · 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 <b>? (a) </b> (b) <b> (c) <\b> (d) <b/>
  2. 2.🔢 In a basic web page file, which comes LAST? (a) </body> (b) <body> (c) <head> (d) </html>
  3. 3.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  4. 4.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <h1> (c) <img> (d) <a>
  5. 5.🔗 Which address opens when you click this link?
    <a href="https://example.com">Take the quiz</a>
    (a) Take the quiz (b) art.html (c) maths.html (d) https://example.com
  6. 6.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="50">
  7. 7.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) makes a list (d) adds a picture
  8. 8.🔍 One closing tag is missing. Which one?
    <h1>My pets
    <p>I love mangoes.</p>
    <h2>Hello, world!</h2>
    (a) </p> (b) </h2> (c) </em> (d) </h1>
  9. 9.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) cake.jpg (b) map.png (c) kite.png (d) A red kite
  10. 10.True or false: <ul> has a closing tag. (a) True (b) False
  11. 11.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  12. 12.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Orange</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
  13. 13.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) art.html (b) Take the quiz (c) href (d) School news
  14. 14.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ol>
  15. 15.True or false: <table> goes in the head. (a) False (b) True
  16. 16.Which of these is true of a web browser? (a) stores a website’s files (b) shows line numbers (c) has an address bar (d) colours code to help us
  17. 17.🔗 Which words do you click on?
    <a href="quiz.html">Visit the site</a>
    (a) Maths fun (b) href (c) quiz.html (d) Visit the site
  18. 18.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
  19. 19.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h4>? (a) <h2> (b) <h4> (c) <h6> (d) <h1>
  20. 20.True or false: HTML on its own can make headings. (a) False (b) True
  21. 21.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h6>? (a) <h6> (b) <h4> (c) <h1> (d) <h3>
  22. 22.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h6>? (a) <h1> (b) <h5> (c) <h6> (d) <h2>
  23. 23.🔗 Which words do you click on?
    <a href="quiz.html">Art corner</a>
    (a) quiz.html (b) School news (c) href (d) Art corner
  24. 24.📄 Can HTML on its own make headings? (a) No (b) Yes
  25. 25.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="150">
  27. 27.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  28. 28.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Guava</li>
    </ul>
  29. 29.🔗 Where does this link open?
    <a href="games.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  30. 30.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>My best friend</h4>
    <p>Hello, world!</p>
  32. 32.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <em>Hello, world!</em>
    line 2: <h2>My best friend
    line 3: <h3>The red kite</h3>
    (a) line 1 (b) line 2 (c) line 3
  34. 34.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    (a) The red kite (b) Rain today (c) Fun facts
  35. 35.True or false: <ul> lists things in any order. (a) False (b) True
  36. 36.🧱 HTML gives a web page its ___. (a) sound (b) colours (c) speed (d) structure
  37. 37.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>My best friend</h2>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
  38. 38.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    (a) Good morning! (b) My best friend (c) Cricket is fun. (d) Hello, world!
  39. 39.Which of these has a closing tag? (a) <br> (b) <b> (c) <hr> (d) <meta>
  40. 40.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag

Answer key

  1. </b>
  2. </html>
  3. <a>
  4. <link rel="stylesheet">
  5. https://example.com
  6. 50
  7. starts a new line
  8. </h1>
  9. kite.png
  10. True
  11. <ul>
  12. 2
  13. School news
  14. 3
  15. False
  16. has an address bar
  17. Visit the site
  18. <ol>
  19. <h1>
  20. True
  21. <h1>
  22. <h6>
  23. Art corner
  24. Yes
  25. <!DOCTYPE html>
  26. 150
  27. Yes
  28. 2
  29. in a new tab
  30. in the body
  31. 2
  32. 3
  33. line 2
  34. The red kite
  35. True
  36. structure
  37. 3
  38. Hello, world!
  39. <b>
  40. a closing tag

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