← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 233 · 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.📛 In <a href="x.html">, what is href? (a) an attribute (b) a comment (c) a closing tag (d) an element name
  2. 2.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
  3. 3.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
  4. 4.💬 Does the browser show comments on the page? (a) Yes (b) No
  5. 5.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
  6. 6.True or false: <b> is an empty tag. (a) True (b) False
  7. 7.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
  8. 8.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="400">
  9. 9.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as one space (d) as a dot
  10. 10.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h4> or <h3>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  11. 11.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) body (b) My Hobbies (c) Easy snacks (d) I like to read.
  12. 12.Which of these is an opening tag? (a) </p> (b) </body> (c) </li> (d) <body>
  13. 13.True or false: HTML on its own can run a game loop. (a) False (b) True
  14. 14.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h5>? (a) <h3> (b) <h6> (c) <h4> (d) <h5>
  15. 15.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
  16. 16.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
  17. 17.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) Contact us (b) news.html (c) href (d) About us
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) An old fort (b) width (c) Our school bus (d) bus.jpg
  19. 19.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
  20. 20.📄 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) Class 7 Blog (b) body (c) Try this poha. (d) Match report
  21. 21.Which of these has a closing tag? (a) <img> (b) <br> (c) <ul> (d) <input>
  22. 22.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
    (a) numbers (b) bullets
  23. 23.🔗 Which address opens when you click this link?
    <a href="about.html">Visit the site</a>
    (a) about.html (b) https://example.com (c) Visit the site (d) contact.html
  24. 24.🔗 Which address opens when you click this link?
    <a href="contact.html">About us</a>
    (a) maths.html (b) https://example.com (c) About us (d) contact.html
  25. 25.Which of these is true of a web server? (a) hosts websites online (b) is where we type code (c) saves our .html files (d) has an address bar
  26. 26.Which of these is an opening tag? (a) </h1> (b) </title> (c) </p> (d) <title>
  27. 27.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) answers page requests (d) shows line numbers
  28. 28.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  29. 29.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) src (d) height
  30. 30.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    (a) The red kite (b) My best friend (c) Cricket is fun.
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Birds sing<br>Kites fly high<br>Rivers flow</p>
  32. 32.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h6>? (a) <h6> (b) <h2> (c) <h4> (d) <h5>
  33. 33.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h5>? (a) <h3> (b) <h6> (c) <h2> (d) <h5>
  34. 34.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h4>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
  35. 35.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h6>? (a) <h1> (b) <h6> (c) <h3> (d) <h2>
  36. 36.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  37. 37.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <h6> (d) <br>
  38. 38.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  39. 39.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  40. 40.📄 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>We won by 5 runs.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) All about me (c) We won by 5 runs. (d) index.html

Answer key

  1. an attribute
  2. <a>
  3. <li>
  4. No
  5. 6
  6. False
  7. <!DOCTYPE html>
  8. 400
  9. as one space
  10. <h4>
  11. Easy snacks
  12. <body>
  13. False
  14. <h6>
  15. opens it in a new tab
  16. to leave notes
  17. About us
  18. Our school bus
  19. element
  20. Match report
  21. <ul>
  22. numbers
  23. about.html
  24. contact.html
  25. hosts websites online
  26. <title>
  27. answers page requests
  28. Yes
  29. alt
  30. My best friend
  31. 5
  32. <h6>
  33. <h6>
  34. <h1>
  35. <h1>
  36. in the body
  37. <h1>
  38. href
  39. an empty tag
  40. Class 7 Blog

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