← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 900 · 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.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Cricket is fun.</p> -->
  3. 3.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  4. 4.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) Maths fun (b) contact.html (c) Visit the site (d) href
  5. 5.True or false: a web server shows line numbers. (a) False (b) True
  6. 6.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
  7. 7.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
  8. 8.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>My pets</p>
    <p>Our school trip</p>
  9. 9.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) Contact us (b) maths.html (c) contact.html (d) https://example.com
  10. 10.True or false: <ol> is one item of a list. (a) True (b) False
  11. 11.🔗 Which address opens when you click this link?
    <a href="quiz.html">Contact us</a>
    (a) quiz.html (b) Contact us (c) about.html (d) games.html
  12. 12.Which of these goes in the head? (a) <ul> (b) <h1> (c) <table> (d) <title>
  13. 13.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
  14. 14.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My best friend</p>
    <h4>Fun facts</h4>
  15. 15.🔗 Where does this link open?
    <a href="art.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  16. 16.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    (a) Hello, world! (b) Cricket is fun. (c) Our school trip (d) The red kite
  17. 17.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to make links (d) to show pictures
  18. 18.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Our school trip</p>
    <h2>My best friend</h2>
  19. 19.Which of these is an opening tag? (a) </p> (b) </title> (c) <body> (d) </body>
  20. 20.🔗 Where does this link open?
    <a href="games.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  21. 21.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) About us (b) href (c) contact.html (d) Play games
  22. 22.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h5>? (a) <h3> (b) <h5> (c) <h2> (d) <h4>
  23. 23.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
  25. 25.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  26. 26.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  27. 27.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <ul> (d) <p>
  28. 28.True or false: <li> lists things in any order. (a) False (b) True
  29. 29.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="200">
  31. 31.🔍 One closing tag is missing. Which one?
    <h1>Rain today
    <i>My pets</i>
    <small>Cricket is fun.</small>
    (a) </i> (b) </small> (c) </em> (d) </h1>
  32. 32.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>My pets</p>
    <p>Good morning!</p>
    <h2>Cricket is fun.</h2>
    <h3>Rain today</h3>
  33. 33.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
  34. 34.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <h2>Fun facts</h2>
  35. 35.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) shows line numbers (d) stores a website’s files
  36. 36.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  37. 37.True or false: <br> is an empty tag. (a) True (b) False
  38. 38.📄 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>Mars is red.</p>
    </body>
    </html>
    (a) My drawings (b) Riya’s Recipes (c) Mars is red. (d) index.html
  39. 39.💬 Does the browser show comments on the page? (a) Yes (b) No
  40. 40.🔗 Where does this link open?
    <a href="about.html">Contact us</a>
    (a) in the same tab (b) in a new tab

Answer key

  1. to describe the image
  2. 2
  3. <li>
  4. Visit the site
  5. False
  6. <h1>
  7. the body
  8. 1
  9. contact.html
  10. False
  11. quiz.html
  12. <title>
  13. a code editor
  14. 2
  15. in a new tab
  16. The red kite
  17. to leave notes
  18. 2
  19. <body>
  20. in a new tab
  21. Play games
  22. <h2>
  23. a closing tag
  24. 5
  25. Yes
  26. opens it in a new tab
  27. <li>
  28. False
  29. has a closing tag
  30. 200
  31. </h1>
  32. 3
  33. <h5>
  34. 2
  35. stores a website’s files
  36. has a closing tag
  37. True
  38. Riya’s Recipes
  39. No
  40. in the same tab

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