← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 624 · 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 picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) tiger.jpg (b) bus.jpg (c) fort.jpg (d) Our school bus
  2. 2.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) body (c) All about me (d) Try this poha.
  3. 3.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
  5. 5.True or false: <ul> shows bullet points. (a) False (b) True
  6. 6.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  7. 7.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>Cricket is fun.</h2>
    <h2>I love mangoes.</h2>
    <p>I love mangoes.</p>
  8. 8.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
  9. 9.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  10. 10.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
  11. 11.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h5> or <h1>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
  12. 12.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.Which of these is true of a web browser? (a) sends pages over the net (b) opens web pages for us (c) is where we type code (d) colours code to help us
  14. 14.🔍 Which is the odd one out? (a) shows line numbers (b) hosts websites online (c) sends pages over the net (d) stores a website’s files
  15. 15.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Art Gallery (b) body (c) Easy snacks (d) Try this poha.
  16. 16.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  18. 18.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
    <p>The red kite</p>
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A tiger asleep (b) tiger.jpg (c) width (d) A red kite
  21. 21.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h6>? (a) <h6> (b) <h4> (c) <h3> (d) <h1>
  22. 22.True or false: <ol> shows bullet points. (a) True (b) False
  23. 23.True or false: <meta> is an empty tag. (a) True (b) False
  24. 24.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h2> (d) <h5>
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="350">
  26. 26.🔗 Which address opens when you click this link?
    <a href="quiz.html">About us</a>
    (a) quiz.html (b) games.html (c) About us (d) about.html
  27. 27.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <!-- <p>My pets</p> -->
    (a) My pets (b) Good morning! (c) Hello, world!
  28. 28.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  29. 29.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  30. 30.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) https://example.com (b) Visit the site (c) contact.html (d) maths.html
  31. 31.True or false: <title> goes in the body. (a) False (b) True
  32. 32.Which of these goes in the head? (a) <h1> (b) <a> (c) <table> (d) <meta charset="utf-8">
  33. 33.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h3>? (a) <h3> (b) <h4> (c) <h1> (d) <h5>
  34. 34.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  35. 35.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h5> or <h2>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
  36. 36.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  37. 37.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) </h2> (c) <h2> (d) <h2/>
  38. 38.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <h6> (d) <p>
  39. 39.🔍 One closing tag is missing. Which one?
    <b>I love mangoes.</b>
    <em>Hello, world!</em>
    <small>Fun facts
    (a) </small> (b) </p> (c) </em> (d) </b>
  40. 40.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor

Answer key

  1. bus.jpg
  2. All about me
  3. a line across the page
  4. 1
  5. True
  6. in the body
  7. 3
  8. -->
  9. Yes
  10. <a>
  11. <h6>
  12. an opening tag
  13. opens web pages for us
  14. shows line numbers
  15. Easy snacks
  16. has a closing tag
  17. Yes
  18. a slash /
  19. 2
  20. A tiger asleep
  21. <h6>
  22. False
  23. True
  24. <h2>
  25. 350
  26. quiz.html
  27. My pets
  28. Yes
  29. a closing tag
  30. contact.html
  31. False
  32. <meta charset="utf-8">
  33. <h5>
  34. <ul>
  35. <h5>
  36. True
  37. </h2>
  38. <h6>
  39. </small>
  40. a code editor

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