← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 543 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) Our school bus (b) The full moon (c) width (d) moon.png
  2. 2.📋 What number does the browser show next to “Litchi”?
    <ol start="4">
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  3. 3.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>My pets</p>
    <h4>Our school trip</h4>
    <h4>Fun facts</h4>
    <h4>I love mangoes.</h4>
  4. 4.Which of these has a closing tag? (a) <br> (b) <p> (c) <input> (d) <img>
  5. 5.Which of these has a closing tag? (a) <hr> (b) <br> (c) <meta> (d) <h1>
  6. 6.🔢 In a basic web page file, which comes first: “<body>” or “</head>”? (a) <body> (b) </head>
  7. 7.🔗 Where does this link open?
    <a href="https://example.com">Art corner</a>
    (a) in the same tab (b) in a new tab
  8. 8.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
    (a) numbers (b) bullets
  9. 9.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  10. 10.Which of these is a closing tag? (a) <body> (b) <h1> (c) <li> (d) </li>
  11. 11.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
    (a) My best friend (b) The red kite (c) I love mangoes. (d) Hello, world!
  12. 12.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
  13. 13.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) news.html (b) Take the quiz (c) art.html (d) maths.html
  14. 14.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  15. 15.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>I love mangoes.</h2>
    <p>My pets</p>
    <p>My pets</p>
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high<br>Sky is blue<br>Roses are red<br>Rivers flow</p>
  17. 17.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  18. 18.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  19. 19.True or false: in <img>, src sets how tall it is. (a) True (b) False
  20. 20.🌍 Which program shows a web page to us? (a) a music player (b) a paint program (c) a calculator (d) a web browser
  21. 21.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
  22. 22.Which of these is a closing tag? (a) </p> (b) <p> (c) <body> (d) <li>
  23. 23.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.True or false: <title> goes in the head. (a) False (b) True
  25. 25.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
  26. 26.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
  27. 27.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="200">
  28. 28.📋 What number does the browser show next to “Papaya”?
    <ol start="7">
      <li>Mango</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  29. 29.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Space Facts (b) Try this poha. (c) body (d) All about me
  30. 30.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) saves our .html files (d) opens web pages for us
  31. 31.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  32. 32.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="50">
  33. 33.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
  34. 34.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <h2>I love mangoes.</h2>
    line 2: <u>My pets</u>
    line 3: <h3>Good morning!
    (a) line 1 (b) line 2 (c) line 3
  36. 36.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h3>? (a) <h3> (b) <h1> (c) <h5> (d) <h2>
  37. 37.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) width (d) src
  38. 38.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
  39. 39.🔗 Where does this link open?
    <a href="news.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  40. 40.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor

Answer key

  1. The full moon
  2. 5
  3. 4
  4. <p>
  5. <h1>
  6. </head>
  7. in the same tab
  8. numbers
  9. False
  10. </li>
  11. I love mangoes.
  12. 2
  13. maths.html
  14. No
  15. 3
  16. 5
  17. an empty tag
  18. has a closing tag
  19. False
  20. a web browser
  21. href
  22. </p>
  23. in the head
  24. True
  25. a slash /
  26. src
  27. 200
  28. 9
  29. All about me
  30. opens web pages for us
  31. bullets
  32. 50
  33. the body
  34. an opening tag
  35. line 3
  36. <h1>
  37. alt
  38. starts a new line
  39. in the same tab
  40. a code editor

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