← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 809 · 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 tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
  2. 2.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) An old fort (b) A tiger asleep (c) fort.jpg (d) width
  3. 3.Which of these is a closing tag? (a) <b> (b) <h1> (c) </h1> (d) <li>
  4. 4.True or false: <ol> shows bullet points. (a) True (b) False
  5. 5.Which of these is an empty tag? (a) <hr> (b) <ul> (c) <h1> (d) <li>
  6. 6.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <style> (d) <p>
  7. 7.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Good morning!</p>
    <h2>Cricket is fun.</h2>
    <p>I love mangoes.</p>
    <h4>Our school trip</h4>
  8. 8.Which of these is an opening tag? (a) </p> (b) </title> (c) <p> (d) </b>
  9. 9.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) turns HTML into a page (d) is where we type code
  10. 10.📝 What does <p> make? (a) a paragraph (b) a picture (c) a table (d) a link
  11. 11.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Language (d) Link
  12. 12.True or false: <li> lists steps in order. (a) True (b) False
  13. 13.True or false: a web server saves our .html files. (a) False (b) True
  14. 14.True or false: <li> goes inside ul or ol. (a) True (b) False
  15. 15.🔍 One closing tag is missing. Which one?
    <b>Cricket is fun.</b>
    <strong>My best friend
    <h2>Good morning!</h2>
    (a) </i> (b) </b> (c) </h2> (d) </strong>
  16. 16.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
  17. 17.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
  18. 18.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>I love mangoes.</h2>
    <p>My best friend</p>
    <h2>Hello, world!</h2>
  19. 19.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  20. 20.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Guava</li>
    </ul>
  21. 21.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) index.html (b) Mars is red. (c) All about me (d) Art Gallery
  22. 22.True or false: in <img>, width sets how tall it is. (a) False (b) True
  23. 23.💬 Does the browser show comments on the page? (a) Yes (b) No
  24. 24.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  25. 25.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h2>
  26. 26.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
  27. 27.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <p>I love mangoes.
    line 2: <u>Rain today</u>
    line 3: <small>Our school trip</small>
    (a) line 2 (b) line 1 (c) line 3
  29. 29.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) Birthday cake (b) A happy dog (c) cake.jpg (d) width
  31. 31.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
  32. 32.🔍 Which is the odd one out? (a) has an address bar (b) shows line numbers (c) saves our .html files (d) colours code to help us
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="300">
  34. 34.True or false: HTML on its own can make links to pages. (a) False (b) True
  35. 35.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  36. 36.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
  37. 37.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
  38. 38.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  39. 39.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <p> (d) <ul>
  40. 40.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h5>? (a) <h6> (b) <h5> (c) <h3> (d) <h1>

Answer key

  1. <h1>
  2. An old fort
  3. </h1>
  4. False
  5. <hr>
  6. <p>
  7. 3
  8. <p>
  9. is where we type code
  10. a paragraph
  11. Language
  12. False
  13. False
  14. True
  15. </strong>
  16. False
  17. 3
  18. 2
  19. <ul>
  20. 2
  21. Art Gallery
  22. False
  23. No
  24. in a new tab
  25. <h5>
  26. 3
  27. an opening tag
  28. line 1
  29. 6
  30. Birthday cake
  31. <li>
  32. has an address bar
  33. 300
  34. True
  35. <a>
  36. href
  37. <h6>
  38. a closing tag
  39. <li>
  40. <h1>

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