← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 532 · 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 heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h6>? (a) <h5> (b) <h4> (c) <h1> (d) <h6>
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!</h2>
    line 2: <p>Rain today</p>
    line 3: <h1>Cricket is fun.
    (a) line 1 (b) line 2 (c) line 3
  3. 3.🔗 Where does this link open?
    <a href="about.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  4. 4.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  5. 5.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h3>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
  6. 6.📝 What does <p> make? (a) a link (b) a picture (c) a table (d) a paragraph
  7. 7.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) href (b) news.html (c) Contact us (d) Visit the site
  8. 8.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) Planets (c) Cricket Club (d) index.html
  9. 9.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  10. 10.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h4> or <h5>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
  11. 11.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  12. 12.True or false: in <img>, width describes the picture. (a) False (b) True
  13. 13.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
  14. 14.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
  15. 15.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) alt (d) src
  16. 16.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h6>? (a) <h5> (b) <h6> (c) <h4> (d) <h2>
  17. 17.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) fort.jpg (b) Our school bus (c) bus.jpg (d) tiger.jpg
  18. 18.💬 Does the browser show comments on the page? (a) Yes (b) No
  19. 19.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Rain today (c) Good morning! (d) My pets
  20. 20.🏷️ Which is the closing tag for <small>? (a) </small> (b) <\small> (c) <small/> (d) <small>
  21. 21.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  22. 22.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    (a) The red kite (b) Hello, world! (c) Cricket is fun.
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) width (b) dog.jpg (c) The full moon (d) A happy dog
  24. 24.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    <p>Rain today</p>
    (a) Rain today (b) Our school trip (c) I love mangoes.
  25. 25.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  26. 26.🔍 Which line is missing its closing tag?
    line 1: <b>Hello, world!</b>
    line 2: <strong>Rain today
    line 3: <p>The red kite</p>
    (a) line 3 (b) line 1 (c) line 2
  27. 27.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h6>
  28. 28.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  29. 29.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    (a) My pets (b) I love mangoes. (c) The red kite
  30. 30.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h4>Good morning!</h4>
    <p>Good morning!</p>
    <h2>Good morning!</h2>
  31. 31.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
  32. 32.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Try this poha. (c) Match report (d) Class 7 Blog
  33. 33.🔗 Where does this link open?
    <a href="art.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  34. 34.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>Our school trip</p>
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
  35. 35.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) href (b) Play games (c) Take the quiz (d) contact.html
  36. 36.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <html> (c) <head> (d) <!DOCTYPE html>
  37. 37.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) width (c) alt (d) src
  38. 38.📋 What number does the browser show next to “Jamun”?
    <ol start="7">
      <li>Banana</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  39. 39.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  40. 40.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) width (d) height

Answer key

  1. <h1>
  2. line 3
  3. in the same tab
  4. has a closing tag
  5. <h6>
  6. a paragraph
  7. Contact us
  8. Cricket Club
  9. <ul>
  10. <h1>
  11. bullets
  12. False
  13. to describe the image
  14. 1
  15. src
  16. <h6>
  17. bus.jpg
  18. No
  19. Rain today
  20. </small>
  21. href
  22. Cricket is fun.
  23. A happy dog
  24. I love mangoes.
  25. No
  26. line 2
  27. <h2>
  28. in the body
  29. The red kite
  30. 3
  31. element
  32. Match report
  33. in a new tab
  34. 4
  35. Take the quiz
  36. <!DOCTYPE html>
  37. height
  38. 10
  39. an opening tag
  40. width

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