← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 410 · 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 of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <table> (d) <meta charset="utf-8">
  2. 2.🔗 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">
  3. 3.🔗 Where does this link open?
    <a href="art.html">About us</a>
    (a) in a new tab (b) in the same tab
  4. 4.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h3>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high</p>
  6. 6.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
  7. 7.True or false: HTML on its own can make links to pages. (a) False (b) True
  8. 8.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) address (d) element
  9. 9.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  10. 10.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>My pets</h2>
    <h2>Hello, world!</h2>
  11. 11.Which of these goes in the head? (a) <ul> (b) <link rel="stylesheet"> (c) <a> (d) <h1>
  12. 12.🔗 Which words do you click on?
    <a href="maths.html">Maths fun</a>
    (a) Art corner (b) maths.html (c) href (d) Maths fun
  13. 13.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Guava</li>
    </ul>
    (a) numbers (b) bullets
  14. 14.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) index.html (c) My Hobbies (d) Easy snacks
  15. 15.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
  16. 16.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) href (b) Contact us (c) Visit the site (d) contact.html
  17. 17.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    (a) Good morning! (b) Rain today (c) Our school trip
  18. 18.🔢 In a basic web page file, which comes first: “</body>” or “<!DOCTYPE html>”? (a) </body> (b) <!DOCTYPE html>
  19. 19.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  20. 20.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h3>Good morning!</h3>
    <h2>Good morning!</h2>
  21. 21.🔠 Are headings shown in bold by default? (a) Yes (b) No
  22. 22.🔗 Where does this link open?
    <a href="quiz.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  23. 23.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <img> (c) <style> (d) <link rel="stylesheet">
  24. 24.🔗 Where does this link open?
    <a href="about.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  25. 25.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Hello, world!</p>
    <h2>Fun facts</h2>
    <h4>My best friend</h4>
  26. 26.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) about.html (b) Visit the site (c) href (d) Maths fun
  27. 27.🔗 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
  28. 28.🔗 Which words do you click on?
    <a href="news.html">School news</a>
    (a) news.html (b) School news (c) Take the quiz (d) href
  29. 29.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as a dot (d) as one space
  30. 30.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
  31. 31.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h3> or <h1>? (a) <h6> (b) <h3> (c) <h2> (d) <h1>
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
  33. 33.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h3>Good morning!</h3>
    <p>Fun facts</p>
    <h2>My best friend</h2>
    <h2>Fun facts</h2>
  34. 34.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
  35. 35.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="50">
  37. 37.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Welcome! (b) body (c) Space Facts (d) We won by 5 runs.
  38. 38.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  39. 39.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) height (c) width (d) alt
  40. 40.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h4> or <h1>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>

Answer key

  1. <table>
  2. <a href="about.html">
  3. in the same tab
  4. <h5>
  5. 2
  6. <!--
  7. True
  8. element
  9. 3
  10. 1
  11. <link rel="stylesheet">
  12. Maths fun
  13. bullets
  14. My Hobbies
  15. a slash /
  16. Contact us
  17. Rain today
  18. <!DOCTYPE html>
  19. False
  20. 3
  21. Yes
  22. in the same tab
  23. <img>
  24. in a new tab
  25. 3
  26. Visit the site
  27. in a new tab
  28. School news
  29. as one space
  30. <li>
  31. <h6>
  32. 1
  33. 4
  34. <h6>
  35. a closing tag
  36. 50
  37. Welcome!
  38. No
  39. height
  40. <h1>

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