← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 507 · 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.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) My Hobbies (c) All about me (d) index.html
  2. 2.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Hello, world!</p>
    <h2>I love mangoes.</h2>
    <h2>Our school trip</h2>
  3. 3.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
  4. 4.🔗 Which address opens when you click this link?
    <a href="games.html">Art corner</a>
    (a) games.html (b) Art corner (c) about.html (d) contact.html
  5. 5.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ol>
  6. 6.True or false: a web server sends pages over the net. (a) True (b) False
  7. 7.🔍 Which is the odd one out? (a) has an address bar (b) colours code to help us (c) turns HTML into a page (d) shows pages from the web
  8. 8.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) alt (d) width
  9. 9.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) maths.html (b) news.html (c) art.html (d) Visit the site
  10. 10.True or false: a code editor hosts websites online. (a) True (b) False
  11. 11.🔗 Where does this link open?
    <a href="https://example.com">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  12. 12.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
  14. 14.🔗 Which address opens when you click this link?
    <a href="contact.html">About us</a>
    (a) maths.html (b) https://example.com (c) contact.html (d) About us
  15. 15.True or false: in <img>, alt tells which image to load. (a) False (b) True
  16. 16.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    (a) Cricket is fun. (b) The red kite (c) I love mangoes. (d) Fun facts
  17. 17.🔗 Where does this link open?
    <a href="contact.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  18. 18.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) </body> (b) <head>
  19. 19.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>The red kite</p>
    (a) Rain today (b) The red kite (c) Our school trip
  20. 20.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) My Hobbies (c) Easy snacks (d) Here is my best one.
  21. 21.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h6> (c) <h3> (d) <h1>
  22. 22.Which of these is true of a web server? (a) sends pages over the net (b) shows pages from the web (c) turns HTML into a page (d) shows line numbers
  23. 23.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Orange</li>
    </ol>
    (a) bullets (b) numbers
  24. 24.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) My best friend (c) Rain today (d) Cricket is fun.
  25. 25.💬 Does the browser show comments on the page? (a) No (b) Yes
  26. 26.True or false: a web browser answers page requests. (a) False (b) True
  27. 27.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <h2>My best friend</h2>
  29. 29.True or false: HTML on its own can pick a random number. (a) False (b) True
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
  31. 31.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) </h1> (c) <h1/> (d) <h1>
  32. 32.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My drawings (b) Thanks for visiting. (c) Cricket Club (d) body
  33. 33.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h3> or <h2>? (a) <h3> (b) <h6> (c) <h2> (d) <h4>
  34. 34.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  35. 35.True or false: HTML on its own can add pictures to a page. (a) True (b) False
  36. 36.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  37. 37.🔍 One closing tag is missing. Which one?
    <h2>Good morning!</h2>
    <b>Cricket is fun.</b>
    <small>Hello, world!
    (a) </small> (b) </h2> (c) </b> (d) </u>
  38. 38.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h1> (d) <h3>
  39. 39.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
  40. 40.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) moon.png (b) cake.jpg (c) dog.jpg (d) Birthday cake

Answer key

  1. My Hobbies
  2. 3
  3. <img>
  4. games.html
  5. 6
  6. True
  7. colours code to help us
  8. alt
  9. maths.html
  10. False
  11. in the same tab
  12. <ol>
  13. 2
  14. contact.html
  15. False
  16. The red kite
  17. in a new tab
  18. <head>
  19. Our school trip
  20. My Hobbies
  21. <h6>
  22. sends pages over the net
  23. numbers
  24. Cricket is fun.
  25. No
  26. False
  27. a closing tag
  28. 2
  29. False
  30. 1
  31. </h1>
  32. My drawings
  33. <h6>
  34. an empty tag
  35. True
  36. a closing tag
  37. </small>
  38. <h6>
  39. -->
  40. cake.jpg

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