← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 28 · 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 heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h1>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
  2. 2.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) news.html (b) art.html (c) maths.html (d) About us
  3. 3.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
  4. 4.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
  5. 5.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h4> (d) <h6>
  6. 6.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  7. 7.True or false: <img> is an empty tag. (a) False (b) True
  8. 8.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  9. 9.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  10. 10.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name
  11. 11.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  12. 12.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>I love mangoes.</p>
    <h2>The red kite</h2>
    <p>Rain today</p>
    <h4>Rain today</h4>
  14. 14.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) alt (d) height
  15. 15.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>My best friend</h2>
    <p>Rain today</p>
    <h2>I love mangoes.</h2>
    <p>Fun facts</p>
  16. 16.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  17. 17.True or false: <ul> shows bullet points. (a) True (b) False
  18. 18.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
  19. 19.True or false: <ul> is an ordered list. (a) False (b) True
  20. 20.True or false: HTML on its own cannot make tables. (a) True (b) False
  21. 21.Which of these is true of a web browser? (a) turns HTML into a page (b) is where we type code (c) shows line numbers (d) hosts websites online
  22. 22.🔗 Where does this link open?
    <a href="contact.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  23. 23.True or false: <ol> is an ordered list. (a) True (b) False
  24. 24.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
  25. 25.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <!DOCTYPE html> (c) </head> (d) </html>
  26. 26.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) An old fort (b) kite.png (c) fort.jpg (d) tiger.jpg
  27. 27.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.True or false: HTML on its own cannot keep a high score. (a) True (b) False
  29. 29.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  30. 30.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  31. 31.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  32. 32.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the head (d) the title
  33. 33.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h3>Rain today</h3>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
  34. 34.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  35. 35.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="250">
    (a) dog.jpg (b) cake.jpg (c) Map of India (d) map.png
  36. 36.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h6>? (a) <h2> (b) <h5> (c) <h6> (d) <h3>
  37. 37.🔗 Which words do you click on?
    <a href="https://example.com">School news</a>
    (a) href (b) https://example.com (c) Take the quiz (d) School news
  38. 38.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  39. 39.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ol>
  40. 40.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Papaya</li>
    </ul>

Answer key

  1. <h1>
  2. maths.html
  3. <img>
  4. 3
  5. <h6>
  6. in the body
  7. True
  8. No
  9. Yes
  10. an attribute
  11. <ol>
  12. an opening tag
  13. 3
  14. src
  15. 3
  16. <a href="about.html">
  17. True
  18. a web browser
  19. False
  20. False
  21. turns HTML into a page
  22. in the same tab
  23. True
  24. a web browser
  25. <!DOCTYPE html>
  26. fort.jpg
  27. a closing tag
  28. True
  29. -->
  30. has a closing tag
  31. opens it in a new tab
  32. the body
  33. 2
  34. <h1>
  35. map.png
  36. <h2>
  37. School news
  38. False
  39. 4
  40. 2

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