← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 663 · 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.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) colours code to help us (d) has an address bar
  2. 2.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  3. 3.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) </h3> (c) <h3> (d) <\h3>
  4. 4.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
  5. 5.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) HyperText (d) High Tech
  6. 6.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
  7. 7.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) An old fort (b) fort.jpg (c) A tiger asleep (d) width
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue</p>
  9. 9.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
  10. 10.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
  11. 11.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
  12. 12.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
    (a) numbers (b) bullets
  13. 13.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) kite.png (b) A tiger asleep (c) tiger.jpg (d) map.png
  14. 14.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
  15. 15.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    <p>I love mangoes.</p>
  16. 16.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  17. 17.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) cake.jpg (b) Birthday cake (c) dog.jpg (d) moon.png
  18. 18.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  19. 19.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>Good morning!</p>
    (a) Cricket is fun. (b) The red kite (c) Rain today (d) Good morning!
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    (a) Good morning! (b) I love mangoes. (c) Cricket is fun.
  21. 21.📝 What does <br> do? (a) makes text bold (b) makes a list (c) adds a picture (d) starts a new line
  22. 22.🔍 One closing tag is missing. Which one?
    <h1>Our school trip</h1>
    <em>Good morning!
    <p>The red kite</p>
    (a) </em> (b) </p> (c) </b> (d) </h1>
  23. 23.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
  24. 24.🔍 One closing tag is missing. Which one?
    <h1>Cricket is fun.</h1>
    <em>Rain today</em>
    <strong>My pets
    (a) </em> (b) </h1> (c) </i> (d) </strong>
  25. 25.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>The red kite</h2>
    <h2>Rain today</h2>
  26. 26.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </html> (c) <head> (d) <html>
  27. 27.Which of these has a closing tag? (a) <meta> (b) <p> (c) <input> (d) <br>
  28. 28.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h2>? (a) <h2> (b) <h3> (c) <h1> (d) <h4>
  29. 29.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  30. 30.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  32. 32.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h6> (d) <h5>
  33. 33.🔗 Which address opens when you click this link?
    <a href="contact.html">Art corner</a>
    (a) contact.html (b) Art corner (c) maths.html (d) https://example.com
  34. 34.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Hello, world!</p>
    <h3>Fun facts</h3>
  35. 35.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="100">
    (a) map.png (b) Map of India (c) width (d) Birthday cake
  36. 36.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) </strong> (c) <\strong> (d) <strong/>
  37. 37.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>My pets</p>
    <p>Fun facts</p>
    <h3>I love mangoes.</h3>
  38. 38.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) <em> (d) </em>
  39. 39.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
  40. 40.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Stars shine</p>

Answer key

  1. has an address bar
  2. Yes
  3. </h3>
  4. <
  5. HyperText
  6. a slash /
  7. An old fort
  8. 2
  9. to describe the image
  10. <!DOCTYPE html>
  11. <h1>
  12. bullets
  13. tiger.jpg
  14. <a>
  15. 2
  16. 5
  17. cake.jpg
  18. in a new tab
  19. Rain today
  20. I love mangoes.
  21. starts a new line
  22. </em>
  23. 2
  24. </strong>
  25. 1
  26. </html>
  27. <p>
  28. <h1>
  29. <!DOCTYPE html>
  30. a closing tag
  31. 2
  32. <h6>
  33. contact.html
  34. 2
  35. Map of India
  36. </strong>
  37. 2
  38. </em>
  39. 3
  40. 3

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