← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 820 · 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.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  2. 2.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
  4. 4.True or false: in <img>, height sets how tall it is. (a) True (b) False
  5. 5.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  6. 6.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Planets (b) Riya’s Recipes (c) We won by 5 runs. (d) index.html
  7. 7.Which of these is an opening tag? (a) </title> (b) </p> (c) <body> (d) </h1>
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) The full moon (b) width (c) Our school bus (d) moon.png
  9. 9.True or false: HTML on its own can make a form. (a) True (b) False
  10. 10.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) </body> (b) <body>
  11. 11.Which of these is a closing tag? (a) </p> (b) <p> (c) <h1> (d) <body>
  12. 12.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
  14. 14.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) map.png (b) A red kite (c) kite.png (d) cake.jpg
  15. 15.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h5>? (a) <h2> (b) <h4> (c) <h3> (d) <h5>
  16. 16.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h3> (b) <h1> (c) <h4> (d) <h2>
  17. 17.🔗 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">
  18. 18.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  19. 19.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  20. 20.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to colour it (d) to make it bigger
  21. 21.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <ul> (c) <style> (d) <title>
  22. 22.🔠 Are headings shown in bold by default? (a) No (b) Yes
  23. 23.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Good morning!</h2>
    <p>Rain today</p>
    <p>My best friend</p>
  24. 24.Which of these goes in the head? (a) <img> (b) <meta charset="utf-8"> (c) <h1> (d) <a>
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="150">
  26. 26.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    (a) Cricket is fun. (b) I love mangoes. (c) Our school trip (d) Fun facts
  27. 27.🔗 Where does this link open?
    <a href="games.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  28. 28.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
  29. 29.Which of these is an opening tag? (a) </li> (b) <h1> (c) </title> (d) </body>
  30. 30.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
  32. 32.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) https://example.com (b) Take the quiz (c) about.html (d) contact.html
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
  34. 34.True or false: a web server is where we type code. (a) False (b) True
  35. 35.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  36. 36.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
  37. 37.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h4>The red kite</h4>
    <p>The red kite</p>
    <h2>Hello, world!</h2>
  38. 38.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) stores a website’s files (d) colours code to help us
  39. 39.True or false: a code editor sends pages over the net. (a) False (b) True
  40. 40.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) opens web pages for us (d) saves our .html files

Answer key

  1. in the head
  2. <ul>
  3. 1
  4. True
  5. an empty tag
  6. Riya’s Recipes
  7. <body>
  8. The full moon
  9. True
  10. <body>
  11. </p>
  12. a closing tag
  13. 1
  14. kite.png
  15. <h2>
  16. <h1>
  17. <a href="about.html">
  18. 3
  19. has a closing tag
  20. to describe the image
  21. <ul>
  22. Yes
  23. 3
  24. <meta charset="utf-8">
  25. 150
  26. Fun facts
  27. in a new tab
  28. a web browser
  29. <h1>
  30. in the head
  31. a web browser
  32. about.html
  33. 1
  34. False
  35. No
  36. an attribute
  37. 3
  38. colours code to help us
  39. False
  40. opens web pages for us

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