← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 40 · 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.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  2. 2.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) contact.html (b) Play games (c) about.html (d) games.html
  3. 3.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  4. 4.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <h2>Our school trip</h2>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
  5. 5.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  6. 6.💾 A web page file usually ends with which extension? (a) .txt (b) .mp3 (c) .png (d) .html
  7. 7.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
  8. 8.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  9. 9.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  10. 10.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
  11. 11.Which of these is an empty tag? (a) <p> (b) <img> (c) <title> (d) <ul>
  12. 12.🔍 One closing tag is missing. Which one?
    <em>My pets</em>
    <i>I love mangoes.
    <h3>Hello, world!</h3>
    (a) </h3> (b) </p> (c) </em> (d) </i>
  13. 13.True or false: <li> goes inside ul or ol. (a) False (b) True
  14. 14.🔗 Where does this link open?
    <a href="https://example.com">Play games</a>
    (a) in a new tab (b) in the same tab
  15. 15.Which of these is an empty tag? (a) <hr> (b) <li> (c) <ul> (d) <title>
  16. 16.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) My drawings (c) Try this poha. (d) Class 7 Blog
  17. 17.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
  18. 18.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) attribute (d) address
  19. 19.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the title (d) the body
  20. 20.📄 Can HTML on its own make headings? (a) No (b) Yes
  21. 21.Which of these is true of a web server? (a) saves our .html files (b) shows line numbers (c) sends pages over the net (d) colours code to help us
  22. 22.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) has an address bar (d) colours code to help us
  23. 23.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h3> or <h1>? (a) <h6> (b) <h1> (c) <h3> (d) <h4>
  24. 24.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h4>My pets</h4>
    <p>Fun facts</p>
    <p>My best friend</p>
    <h2>Rain today</h2>
  25. 25.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
  26. 26.💬 Does the browser show comments on the page? (a) Yes (b) No
  27. 27.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h4> or <h6>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
  28. 28.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  29. 29.Which of these is true of a web browser? (a) saves our .html files (b) sends pages over the net (c) turns HTML into a page (d) stores a website’s files
  30. 30.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  31. 31.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  32. 32.🔗 Which address opens when you click this link?
    <a href="about.html">School news</a>
    (a) contact.html (b) about.html (c) School news (d) https://example.com
  33. 33.🔗 Where does this link open?
    <a href="quiz.html">Play games</a>
    (a) in a new tab (b) in the same tab
  34. 34.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h1>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
  35. 35.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <p>Fun facts</p>
    <h2>My pets</h2>
    <h2>Cricket is fun.</h2>
    <p>Fun facts</p>
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="50">
  37. 37.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  38. 38.True or false: in <img>, src shows if the image fails. (a) False (b) True
  39. 39.True or false: <ul> has a closing tag. (a) True (b) False
  40. 40.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag

Answer key

  1. a closing tag
  2. games.html
  3. in a new tab
  4. 5
  5. 6
  6. .html
  7. -->
  8. Yes
  9. No
  10. <h6>
  11. <img>
  12. </i>
  13. True
  14. in the same tab
  15. <hr>
  16. My drawings
  17. 1
  18. element
  19. the body
  20. Yes
  21. sends pages over the net
  22. has an address bar
  23. <h6>
  24. 3
  25. to leave notes
  26. No
  27. <h6>
  28. 2
  29. turns HTML into a page
  30. No
  31. numbers
  32. about.html
  33. in the same tab
  34. <h1>
  35. 4
  36. 50
  37. an empty tag
  38. False
  39. True
  40. has a closing tag

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