← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 55 · 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 is the closing tag for <small>? (a) <small/> (b) <\small> (c) <small> (d) </small>
  3. 3.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <head> (c) <!DOCTYPE html> (d) </head>
  4. 4.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <ul> (d) <br>
  5. 5.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h2>? (a) <h4> (b) <h2> (c) <h1> (d) <h3>
  6. 6.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  7. 7.📄 Can HTML on its own make headings? (a) Yes (b) No
  8. 8.True or false: <title> goes in the head. (a) True (b) False
  9. 9.True or false: a web server answers page requests. (a) True (b) False
  10. 10.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <br> (d) <b>
  11. 11.🔍 One closing tag is missing. Which one?
    <h2>Hello, world!</h2>
    <small>My best friend</small>
    <h1>Rain today
    (a) </small> (b) </h2> (c) </h1> (d) </u>
  12. 12.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
  13. 13.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  14. 14.🔗 Where does this link open?
    <a href="https://example.com">About us</a>
    (a) in a new tab (b) in the same tab
  15. 15.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  16. 16.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) height (d) alt
  17. 17.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
    (a) My best friend (b) Cricket is fun. (c) Hello, world! (d) Good morning!
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) width (b) The full moon (c) A happy dog (d) dog.jpg
  19. 19.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  20. 20.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
  21. 21.🔗 Where does this link open?
    <a href="contact.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  22. 22.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) We won by 5 runs. (c) My Hobbies (d) Planets
  23. 23.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  24. 24.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
  25. 25.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
  26. 26.Which of these is a closing tag? (a) <b> (b) <title> (c) </p> (d) <h1>
  27. 27.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  28. 28.🔍 One closing tag is missing. Which one?
    <p>Rain today
    <h3>Our school trip</h3>
    <strong>Good morning!</strong>
    (a) </i> (b) </strong> (c) </h3> (d) </p>
  29. 29.True or false: in <img>, src names the picture file. (a) False (b) True
  30. 30.True or false: <b> is an empty tag. (a) False (b) True
  31. 31.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
  33. 33.🔗 Which address opens when you click this link?
    <a href="games.html">Art corner</a>
    (a) about.html (b) contact.html (c) Art corner (d) games.html
  34. 34.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Modern (c) Markup (d) Mouse
  35. 35.Which of these is an opening tag? (a) </title> (b) </li> (c) <body> (d) </p>
  36. 36.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
  37. 37.🔗 Where does this link open?
    <a href="art.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  38. 38.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  39. 39.Which of these goes in the head? (a) <h1> (b) <ul> (c) <link rel="stylesheet"> (d) <p>
  40. 40.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag

Answer key

  1. a closing tag
  2. </small>
  3. </html>
  4. <ul>
  5. <h4>
  6. opens it in a new tab
  7. Yes
  8. True
  9. True
  10. <b>
  11. </h1>
  12. a web server
  13. Yes
  14. in the same tab
  15. 2
  16. height
  17. My best friend
  18. A happy dog
  19. bullets
  20. an attribute
  21. in the same tab
  22. Planets
  23. has a closing tag
  24. <h1>
  25. <a>
  26. </p>
  27. True
  28. </p>
  29. True
  30. False
  31. element
  32. 1
  33. games.html
  34. Markup
  35. <body>
  36. a slash /
  37. in a new tab
  38. in the body
  39. <link rel="stylesheet">
  40. an opening tag

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