← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 457 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) cake.jpg (b) A happy dog (c) Birthday cake (d) width
  2. 2.💬 Does the browser show comments on the page? (a) No (b) Yes
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  4. 4.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h6> (d) <h1>
  5. 5.True or false: <li> has a closing tag. (a) False (b) True
  6. 6.🔗 Which address opens when you click this link?
    <a href="quiz.html">Contact us</a>
    (a) about.html (b) Contact us (c) quiz.html (d) games.html
  7. 7.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
  8. 8.True or false: <p> is an empty tag. (a) True (b) False
  9. 9.🔗 Which address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) contact.html (b) games.html (c) about.html (d) Maths fun
  10. 10.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  11. 11.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  12. 12.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
  13. 13.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  14. 14.True or false: a web browser answers page requests. (a) False (b) True
  15. 15.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) news.html (b) art.html (c) Visit the site (d) maths.html
  16. 16.True or false: HTML on its own cannot make headings. (a) True (b) False
  17. 17.🔤 In “HTML”, what does the L stand for? (a) Link (b) Laptop (c) Line (d) Language
  18. 18.Which of these has a closing tag? (a) <meta> (b) <p> (c) <input> (d) <img>
  19. 19.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  20. 20.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  21. 21.Which of these is an opening tag? (a) </title> (b) </li> (c) </p> (d) <p>
  22. 22.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h4> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h4>
  23. 23.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Hello, world!</h2>
    <p>The red kite</p>
    <h2>Hello, world!</h2>
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue</p>
  26. 26.True or false: <a> goes in the head. (a) True (b) False
  27. 27.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h1> (d) <h3>
  28. 28.Which of these is true of a web browser? (a) stores a website’s files (b) sends pages over the net (c) hosts websites online (d) opens web pages for us
  29. 29.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  30. 30.🔗 Where does this link open?
    <a href="maths.html">About us</a>
    (a) in the same tab (b) in a new tab
  31. 31.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Litchi</li>
    </ul>
  32. 32.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) href (b) https://example.com (c) School news (d) Art corner
  33. 33.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers
  34. 34.True or false: <h1> goes in the body. (a) True (b) False
  35. 35.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="50">
    (a) kite.png (b) Map of India (c) A red kite (d) width
  36. 36.Which of these is an opening tag? (a) </li> (b) </body> (c) <h1> (d) </h1>
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
  38. 38.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h3>
  39. 39.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h4> or <h1>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) fort.jpg (b) width (c) A tiger asleep (d) An old fort

Answer key

  1. Birthday cake
  2. No
  3. 3
  4. <h1>
  5. True
  6. quiz.html
  7. element
  8. False
  9. games.html
  10. <ol>
  11. <ul>
  12. opens it in a new tab
  13. an empty tag
  14. False
  15. maths.html
  16. False
  17. Language
  18. <p>
  19. in a new tab
  20. <!DOCTYPE html>
  21. <p>
  22. <h2>
  23. in the head
  24. 2
  25. 2
  26. False
  27. <h6>
  28. opens web pages for us
  29. in the head
  30. in the same tab
  31. 2
  32. Art corner
  33. bullets
  34. True
  35. A red kite
  36. <h1>
  37. 1
  38. <h5>
  39. <h4>
  40. An old fort

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