← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 981 · 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.🔍 One closing tag is missing. Which one?
    <h3>Good morning!
    <i>Our school trip</i>
    <p>Rain today</p>
    (a) </em> (b) </h3> (c) </p> (d) </i>
  2. 2.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
  3. 3.True or false: <title> goes in the body. (a) True (b) False
  4. 4.Which of these is a closing tag? (a) <p> (b) <body> (c) </body> (d) <h1>
  5. 5.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  6. 6.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Planets (b) Class 7 Blog (c) body (d) Here is my best one.
  7. 7.Which of these has a closing tag? (a) <ul> (b) <hr> (c) <br> (d) <input>
  8. 8.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  9. 9.True or false: a code editor turns HTML into a page. (a) True (b) False
  10. 10.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
  11. 11.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="50">
    (a) A red kite (b) cake.jpg (c) kite.png (d) map.png
  12. 12.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
  13. 13.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
  14. 14.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
  15. 15.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dot . (d) a dollar $
  16. 16.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <p>The red kite</p>
    (a) Fun facts (b) Rain today (c) I love mangoes. (d) The red kite
  17. 17.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  18. 18.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to make it bigger (d) to colour it
  19. 19.💬 How does an HTML comment end? (a) >> (b) --> (c) // (d) */
  20. 20.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>
    (a) numbers (b) bullets
  21. 21.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>My pets</p> -->
  22. 22.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
    (a) numbers (b) bullets
  23. 23.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red</p>
  25. 25.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) address (d) editor
  26. 26.True or false: in <img>, height sets how tall it is. (a) True (b) False
  27. 27.🔗 Where does this link open?
    <a href="art.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  28. 28.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  29. 29.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <p>Rain today</p>
    (a) Fun facts (b) Rain today (c) I love mangoes.
  30. 30.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
  31. 31.💬 How does an HTML comment start? (a) <!-- (b) # (c) // (d) /*
  32. 32.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  33. 33.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>The red kite</p>
    <h4>Hello, world!</h4>
  34. 34.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) index.html (b) Mars is red. (c) Class 7 Blog (d) Welcome!
  35. 35.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  36. 36.True or false: <img> is an empty tag. (a) True (b) False
  37. 37.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
  38. 38.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Class 7 Blog (c) All about me (d) Thanks for visiting.
  39. 39.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) quiz.html (b) about.html (c) School news (d) games.html
  40. 40.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Sky is blue</p>

Answer key

  1. </h3>
  2. True
  3. False
  4. </body>
  5. a web browser
  6. Planets
  7. <ul>
  8. <a href="about.html">
  9. False
  10. src
  11. kite.png
  12. <h1>
  13. to leave notes
  14. <h6>
  15. a slash /
  16. Fun facts
  17. an opening tag
  18. to describe the image
  19. -->
  20. numbers
  21. 1
  22. numbers
  23. 1
  24. 2
  25. element
  26. True
  27. in the same tab
  28. a closing tag
  29. Fun facts
  30. href
  31. <!--
  32. No
  33. 2
  34. Class 7 Blog
  35. Yes
  36. True
  37. as one space
  38. Class 7 Blog
  39. quiz.html
  40. 3

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