← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 807 · 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.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
  2. 2.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) <h1/> (d) </h1>
  3. 3.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) about.html (b) Art corner (c) contact.html (d) https://example.com
  4. 4.🔗 Which address opens when you click this link?
    <a href="quiz.html">Play games</a>
    (a) games.html (b) Play games (c) quiz.html (d) about.html
  5. 5.True or false: <input> has a closing tag. (a) False (b) True
  6. 6.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <meta charset="utf-8"> (d) <title>
  7. 7.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) shows pages from the web (d) answers page requests
  8. 8.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h1> (b) <h3> (c) <h6> (d) <h2>
  9. 9.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    (a) Hello, world! (b) Cricket is fun. (c) Fun facts (d) Good morning!
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="400">
    (a) The full moon (b) Our school bus (c) width (d) moon.png
  11. 11.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <li> (c) <ol>
  12. 12.True or false: a code editor is where we type code. (a) False (b) True
  13. 13.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
  14. 14.🔤 In “HTML”, what does the L stand for? (a) Language (b) Link (c) Line (d) Laptop
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Birds sing<br>Roses are red</p>
  16. 16.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h6>? (a) <h3> (b) <h6> (c) <h1> (d) <h4>
  17. 17.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
  18. 18.Which of these is a closing tag? (a) <b> (b) <title> (c) </body> (d) <p>
  19. 19.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h3>I love mangoes.</h3>
    <h2>Good morning!</h2>
    <h3>Good morning!</h3>
  20. 20.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
  21. 21.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>The red kite</p>
    <p>Good morning!</p>
  22. 22.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) kite.png (b) width (c) A red kite (d) Map of India
  24. 24.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>My best friend</p> -->
  25. 25.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h3> (b) <h1> (c) <h4> (d) <h2>
  26. 26.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
  27. 27.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  28. 28.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
  29. 29.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing<br>Rivers flow<br>Kites fly high<br>Stars shine</p>
  30. 30.🔗 Where does this link open?
    <a href="https://example.com">Visit the site</a>
    (a) in a new tab (b) in the same tab
  31. 31.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Planets (b) Cricket Club (c) Here is my best one. (d) body
  32. 32.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ul>
  33. 33.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) an attribute (d) a closing tag
  34. 34.True or false: <br> is an empty tag. (a) False (b) True
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <b>I love mangoes.</b>
    line 2: <small>Hello, world!
    line 3: <strong>Our school trip</strong>
    (a) line 2 (b) line 1 (c) line 3
  36. 36.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
  37. 37.True or false: a web browser saves our .html files. (a) False (b) True
  38. 38.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>My pets</p>
    <p>Our school trip</p>
    <p>My best friend</p>
  39. 39.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) body (c) Riya’s Recipes (d) Match report
  40. 40.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>

Answer key

  1. 1
  2. </h1>
  3. about.html
  4. quiz.html
  5. False
  6. <table>
  7. answers page requests
  8. <h6>
  9. Good morning!
  10. The full moon
  11. <ol>
  12. True
  13. alt
  14. Language
  15. 4
  16. <h6>
  17. 3
  18. </body>
  19. 4
  20. <li>
  21. 3
  22. <h1>
  23. A red kite
  24. 1
  25. <h4>
  26. -->
  27. <a href="about.html">
  28. alt
  29. 5
  30. in the same tab
  31. Planets
  32. 4
  33. an attribute
  34. True
  35. line 2
  36. False
  37. False
  38. 4
  39. Match report
  40. <ul>

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