← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 509 · 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.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) editor (d) element
  2. 2.Which of these is a closing tag? (a) <h1> (b) <b> (c) <p> (d) </h1>
  3. 3.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a new line (d) as a dot
  4. 4.🔗 Which address opens when you click this link?
    <a href="news.html">About us</a>
    (a) games.html (b) quiz.html (c) About us (d) news.html
  5. 5.True or false: <title> has a closing tag. (a) True (b) False
  6. 6.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h1>? (a) <h2> (b) <h4> (c) <h5> (d) <h1>
  7. 7.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!</h2>
    line 2: <h1>My pets</h1>
    line 3: <h3>The red kite
    (a) line 1 (b) line 3 (c) line 2
  9. 9.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  10. 10.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  11. 11.Which of these is an empty tag? (a) <ul> (b) <br> (c) <p> (d) <title>
  12. 12.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) href (b) games.html (c) Contact us (d) About us
  13. 13.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
  15. 15.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Orange</li>
      <li>Mango</li>
    </ul>
    (a) bullets (b) numbers
  16. 16.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="200">
    (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png
  17. 17.True or false: <ul> lists steps in order. (a) False (b) True
  18. 18.True or false: <img> is an empty tag. (a) False (b) True
  19. 19.True or false: <hr> is an empty tag. (a) True (b) False
  20. 20.🔍 Which line is missing its closing tag?
    line 1: <h3>Fun facts
    line 2: <small>Good morning!</small>
    line 3: <strong>Cricket is fun.</strong>
    (a) line 2 (b) line 3 (c) line 1
  21. 21.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
  22. 22.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) </head>
  23. 23.📝 What does <br> do? (a) starts a new line (b) makes a list (c) makes text bold (d) adds a picture
  24. 24.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) kite.png (b) cake.jpg (c) A red kite (d) map.png
  25. 25.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>Good morning!</h2>
    <p>Good morning!</p>
    <h4>I love mangoes.</h4>
  26. 26.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>My pets</p>
    <h3>The red kite</h3>
    <h4>Fun facts</h4>
    <h2>Rain today</h2>
  27. 27.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <em>Good morning!</em>
    line 2: <h3>Cricket is fun.
    line 3: <h2>Hello, world!</h2>
    (a) line 3 (b) line 1 (c) line 2
  29. 29.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
  30. 30.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to add colour (d) to make links
  31. 31.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
  32. 32.Which of these goes in the head? (a) <img> (b) <a> (c) <meta charset="utf-8"> (d) <p>
  33. 33.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>My best friend</h4>
    <h3>Hello, world!</h3>
    <p>Fun facts</p>
  34. 34.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
  35. 35.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h3>
  36. 36.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  37. 37.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <!DOCTYPE html> (d) <html>
  38. 38.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h3>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <small>Cricket is fun.</small>
    line 2: <p>My best friend</p>
    line 3: <strong>Good morning!
    (a) line 2 (b) line 1 (c) line 3
  40. 40.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table

Answer key

  1. element
  2. </h1>
  3. as one space
  4. news.html
  5. True
  6. <h1>
  7. -->
  8. line 3
  9. Yes
  10. a closing tag
  11. <br>
  12. About us
  13. Yes
  14. 2
  15. bullets
  16. map.png
  17. False
  18. True
  19. True
  20. line 1
  21. <h6>
  22. <!DOCTYPE html>
  23. starts a new line
  24. kite.png
  25. 3
  26. 4
  27. in the head
  28. line 2
  29. a code editor
  30. to leave notes
  31. Markup
  32. <meta charset="utf-8">
  33. 3
  34. a web server
  35. <h1>
  36. a closing tag
  37. <!DOCTYPE html>
  38. <h1>
  39. line 3
  40. a line across the page

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