← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 242 · 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.True or false: <br> has a closing tag. (a) False (b) True
  2. 2.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h5>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
  3. 3.True or false: <ol> shows bullet points. (a) False (b) True
  4. 4.🔍 One closing tag is missing. Which one?
    <h1>Good morning!</h1>
    <u>Hello, world!</u>
    <i>Rain today
    (a) </h1> (b) </u> (c) </strong> (d) </i>
  5. 5.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <p> (c) <style> (d) <title>
  6. 6.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) </html> (b) <!DOCTYPE html>
  7. 7.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  8. 8.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
  9. 9.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>My pets</p>
    <h2>Fun facts</h2>
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="50">
  11. 11.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  12. 12.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) href (b) Play games (c) Take the quiz (d) art.html
  13. 13.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
    (a) Fun facts (b) Cricket is fun. (c) My pets (d) The red kite
  14. 14.🔗 Which address opens when you click this link?
    <a href="about.html">School news</a>
    (a) about.html (b) https://example.com (c) contact.html (d) School news
  15. 15.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
  16. 16.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
  17. 17.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
  18. 18.🔍 Which line is missing its closing tag?
    line 1: <h1>My pets
    line 2: <h3>The red kite</h3>
    line 3: <u>My best friend</u>
    (a) line 3 (b) line 2 (c) line 1
  19. 19.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  20. 20.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) <\h2> (c) </h2> (d) <h2>
  21. 21.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  22. 22.🔗 Which words do you click on?
    <a href="quiz.html">Contact us</a>
    (a) href (b) Visit the site (c) Contact us (d) quiz.html
  23. 23.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="400">
    (a) moon.png (b) fort.jpg (c) bus.jpg (d) The full moon
  24. 24.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Jamun</li>
    </ul>
  25. 25.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  26. 26.True or false: a code editor opens web pages for us. (a) True (b) False
  27. 27.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Hello, world!</p>
    <h4>I love mangoes.</h4>
  28. 28.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  29. 29.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  30. 30.🔗 Where does this link open?
    <a href="about.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  31. 31.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  32. 32.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Orange</li>
    </ul>
  33. 33.🔍 Which is the odd one out? (a) shows pages from the web (b) is where we type code (c) has an address bar (d) opens web pages for us
  34. 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
  35. 35.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 6 (d) 1
  36. 36.True or false: HTML on its own cannot make links to pages. (a) True (b) False
  37. 37.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My drawings (b) Thanks for visiting. (c) Cricket Club (d) index.html
  38. 38.True or false: HTML on its own cannot count button clicks. (a) True (b) False
  39. 39.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) width (b) kite.png (c) Map of India (d) A red kite

Answer key

  1. False
  2. <h1>
  3. False
  4. </i>
  5. <p>
  6. <!DOCTYPE html>
  7. an opening tag
  8. a paragraph
  9. 2
  10. 50
  11. bullets
  12. Take the quiz
  13. The red kite
  14. about.html
  15. a web server
  16. <!DOCTYPE html>
  17. 2
  18. line 1
  19. bullets
  20. </h2>
  21. <ol>
  22. Contact us
  23. moon.png
  24. 2
  25. -->
  26. False
  27. 2
  28. an empty tag
  29. numbers
  30. in a new tab
  31. Yes
  32. 2
  33. is where we type code
  34. <a href="about.html">
  35. 1
  36. False
  37. Cricket Club
  38. True
  39. has a closing tag
  40. A red kite

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