← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 178 · 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 is a closing tag? (a) <b> (b) <h1> (c) </li> (d) <p>
  2. 2.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) width (d) alt
  3. 3.🔗 Where does this link open?
    <a href="contact.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  4. 4.💬 How does an HTML comment end? (a) --> (b) // (c) */ (d) >>
  5. 5.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="50">
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Our school trip</p> -->
  7. 7.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    (a) The red kite (b) Cricket is fun. (c) My pets
  8. 8.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h2> or <h3>? (a) <h2> (b) <h5> (c) <h3> (d) <h1>
  9. 9.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
  10. 10.True or false: a web browser colours code to help us. (a) False (b) True
  11. 11.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) is where we type code (d) shows pages from the web
  12. 12.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Hello, world!</h2>
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Good morning!</p>
    <p>My pets</p>
  13. 13.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  14. 14.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
  15. 15.Which of these is an opening tag? (a) </li> (b) </body> (c) </p> (d) <body>
  16. 16.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  17. 17.True or false: a web server answers page requests. (a) True (b) False
  18. 18.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
  19. 19.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h5> or <h6>? (a) <h1> (b) <h6> (c) <h4> (d) <h5>
  20. 20.🔗 Which address opens when you click this link?
    <a href="quiz.html">Contact us</a>
    (a) quiz.html (b) Contact us (c) about.html (d) games.html
  21. 21.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Hello, world!</h3>
    <h2>Cricket is fun.</h2>
    <h2>Cricket is fun.</h2>
    <h3>Hello, world!</h3>
  22. 22.True or false: HTML on its own can add pictures to a page. (a) True (b) False
  23. 23.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  25. 25.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) </h3> (c) <h3/> (d) <h3>
  26. 26.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
  27. 27.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <p>Rain today
    line 2: <h2>My pets</h2>
    line 3: <h3>The red kite</h3>
    (a) line 3 (b) line 1 (c) line 2
  29. 29.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the body (d) the title
  30. 30.True or false: a web browser has an address bar. (a) True (b) False
  31. 31.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h4>Hello, world!</h4>
    <h3>My best friend</h3>
    <p>The red kite</p>
  32. 32.🔍 One closing tag is missing. Which one?
    <em>Our school trip
    <p>My pets</p>
    <h1>Good morning!</h1>
    (a) </b> (b) </p> (c) </em> (d) </h1>
  33. 33.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) My drawings (c) body (d) Space Facts
  34. 34.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  35. 35.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) src (d) alt
  36. 36.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
    (a) numbers (b) bullets
  37. 37.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  38. 38.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  39. 39.🔗 Which address opens when you click this link?
    <a href="news.html">About us</a>
    (a) About us (b) news.html (c) games.html (d) quiz.html
  40. 40.📋 What number does the browser show next to “Papaya”?
    <ol start="6">
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>

Answer key

  1. </li>
  2. alt
  3. in the same tab
  4. -->
  5. 50
  6. 1
  7. My pets
  8. <h5>
  9. <h1>
  10. False
  11. shows pages from the web
  12. 5
  13. No
  14. <a href="about.html">
  15. <body>
  16. 3
  17. True
  18. True
  19. <h6>
  20. quiz.html
  21. 5
  22. True
  23. an opening tag
  24. an empty tag
  25. </h3>
  26. <!--
  27. numbers
  28. line 1
  29. the body
  30. True
  31. 3
  32. </em>
  33. My drawings
  34. 6
  35. alt
  36. bullets
  37. 2
  38. 6
  39. news.html
  40. 7

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