← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 236 · 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.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
  2. 2.True or false: HTML on its own can add pictures to a page. (a) True (b) False
  3. 3.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h3> or <h4>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
  4. 4.🔍 One closing tag is missing. Which one?
    <em>I love mangoes.</em>
    <h1>Fun facts</h1>
    <p>Good morning!
    (a) </i> (b) </h1> (c) </em> (d) </p>
  5. 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
  6. 6.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  7. 7.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  8. 8.True or false: in <img>, height is read by screen readers. (a) True (b) False
  9. 9.True or false: a code editor stores a website’s files. (a) True (b) False
  10. 10.🏷️ Which is the closing tag for <i>? (a) <i> (b) <\i> (c) <i/> (d) </i>
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="300">
    (a) kite.png (b) Map of India (c) A red kite (d) width
  12. 12.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  13. 13.True or false: <ul> is an unordered list. (a) False (b) True
  14. 14.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
  15. 15.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Good morning!</p>
    <h2>Hello, world!</h2>
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
    <p>Hello, world!</p>
  16. 16.🔍 One closing tag is missing. Which one?
    <u>My pets</u>
    <em>Fun facts</em>
    <strong>Cricket is fun.
    (a) </em> (b) </strong> (c) </u> (d) </h1>
  17. 17.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine</p>
  18. 18.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) games.html (b) Art corner (c) School news (d) href
  19. 19.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
    (a) bullets (b) numbers
  20. 20.💬 Does the browser show comments on the page? (a) Yes (b) No
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) A happy dog (b) cake.jpg (c) Birthday cake (d) width
  22. 22.🔢 In a basic web page file, which comes first: “<head>” or “<!DOCTYPE html>”? (a) <head> (b) <!DOCTYPE html>
  23. 23.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Stars shine<br>Kites fly high</p>
  24. 24.True or false: <img> has a closing tag. (a) False (b) True
  25. 25.Which of these is an empty tag? (a) <br> (b) <ul> (c) <title> (d) <h1>
  26. 26.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) </head>
  27. 27.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  28. 28.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h6>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
  29. 29.True or false: in <img>, width describes the picture. (a) True (b) False
  30. 30.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
  31. 31.🔗 Which address opens when you click this link?
    <a href="contact.html">About us</a>
    (a) contact.html (b) About us (c) https://example.com (d) maths.html
  32. 32.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
  33. 33.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) Contact us (b) maths.html (c) art.html (d) https://example.com
  34. 34.Which of these is true of a code editor? (a) hosts websites online (b) turns HTML into a page (c) saves our .html files (d) sends pages over the net
  35. 35.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
  36. 36.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  37. 37.Which of these is a closing tag? (a) <p> (b) </body> (c) <b> (d) <h1>
  38. 38.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) </h1> (c) <h1/> (d) <\h1>
  39. 39.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  40. 40.🔗 Which address opens when you click this link?
    <a href="about.html">Play games</a>
    (a) Play games (b) contact.html (c) about.html (d) https://example.com

Answer key

  1. to describe the image
  2. True
  3. <h5>
  4. </p>
  5. opens it in a new tab
  6. Yes
  7. an opening tag
  8. False
  9. False
  10. </i>
  11. A red kite
  12. <ul>
  13. True
  14. <h1>
  15. 4
  16. </strong>
  17. 2
  18. Art corner
  19. bullets
  20. No
  21. Birthday cake
  22. <!DOCTYPE html>
  23. 4
  24. False
  25. <br>
  26. <!DOCTYPE html>
  27. an empty tag
  28. <h6>
  29. False
  30. <li>
  31. contact.html
  32. a slash /
  33. https://example.com
  34. saves our .html files
  35. <a>
  36. a closing tag
  37. </body>
  38. </h1>
  39. href
  40. about.html

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