← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 707 · 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) <li> (b) <h1> (c) </h1> (d) <b>
  2. 2.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Match report (b) index.html (c) My Hobbies (d) Try this poha.
  3. 3.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <p> (d) <br>
  4. 4.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Good morning!</p>
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    (a) Good morning! (b) Our school trip (c) Fun facts (d) The red kite
  5. 5.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  6. 6.🔍 One closing tag is missing. Which one?
    <strong>Fun facts</strong>
    <i>Hello, world!
    <p>Rain today</p>
    (a) </strong> (b) </i> (c) </p> (d) </em>
  7. 7.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  8. 8.🔗 Which address opens when you click this link?
    <a href="about.html">About us</a>
    (a) contact.html (b) https://example.com (c) About us (d) about.html
  9. 9.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  10. 10.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) An old fort (b) Our school bus (c) bus.jpg (d) width
  12. 12.True or false: in <img>, height sets how tall it is. (a) True (b) False
  13. 13.True or false: <ul> goes inside ul or ol. (a) False (b) True
  14. 14.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
  15. 15.True or false: in <img>, height shows if the image fails. (a) False (b) True
  16. 16.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
  17. 17.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Match report (b) body (c) Riya’s Recipes (d) Thanks for visiting.
  18. 18.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Guava</li>
    </ul>
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
  20. 20.True or false: <title> goes in the head. (a) False (b) True
  21. 21.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>The red kite</p>
    <h2>Fun facts</h2>
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
  22. 22.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h3> or <h1>? (a) <h4> (b) <h3> (c) <h6> (d) <h1>
  23. 23.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h3> or <h4>? (a) <h6> (b) <h1> (c) <h4> (d) <h3>
  24. 24.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="200">
  26. 26.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h3>? (a) <h4> (b) <h2> (c) <h3> (d) <h6>
  27. 27.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Hello, world!</p>
    <h2>My best friend</h2>
    <p>Cricket is fun.</p>
    <h2>My best friend</h2>
  28. 28.Which of these is true of a web browser? (a) is where we type code (b) sends pages over the net (c) shows line numbers (d) opens web pages for us
  29. 29.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <h1> (c) <ul> (d) <a>
  30. 30.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) https://example.com (b) href (c) Take the quiz (d) Play games
  31. 31.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
    (a) My pets (b) My best friend (c) Hello, world!
  32. 32.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  33. 33.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>Our school trip</p>
    (a) My pets (b) I love mangoes. (c) Our school trip (d) My best friend
  34. 34.True or false: <ol> goes inside ul or ol. (a) True (b) False
  35. 35.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
  36. 36.True or false: a web browser shows line numbers. (a) True (b) False
  37. 37.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) Art corner (b) about.html (c) https://example.com (d) contact.html
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>The red kite</p>
  39. 39.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
  40. 40.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u/> (c) <u> (d) <\u>

Answer key

  1. </h1>
  2. My Hobbies
  3. <h1>
  4. Our school trip
  5. numbers
  6. </i>
  7. has a closing tag
  8. about.html
  9. 6
  10. href
  11. Our school bus
  12. True
  13. False
  14. False
  15. False
  16. <li>
  17. Match report
  18. 2
  19. 2
  20. True
  21. 4
  22. <h6>
  23. <h1>
  24. a web browser
  25. 200
  26. <h6>
  27. 3
  28. opens web pages for us
  29. <link rel="stylesheet">
  30. Take the quiz
  31. My best friend
  32. <ol>
  33. My pets
  34. False
  35. <!DOCTYPE html>
  36. False
  37. about.html
  38. 4
  39. a slash /
  40. </u>

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