← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 401 · 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 picture file does the browser load?
    <img src="map.png" alt="Map of India" width="250">
    (a) map.png (b) cake.jpg (c) Map of India (d) dog.jpg
  2. 2.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  3. 3.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h5> or <h1>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
  4. 4.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
  5. 5.Which of these is true of a code editor? (a) stores a website’s files (b) has an address bar (c) is where we type code (d) answers page requests
  6. 6.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
  7. 7.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h5>? (a) <h5> (b) <h1> (c) <h6> (d) <h2>
  8. 8.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My pets</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <h2>Hello, world!</h2>
  9. 9.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  10. 10.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    (a) I love mangoes. (b) Our school trip (c) Hello, world! (d) Good morning!
  11. 11.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <p> (d) <h6>
  12. 12.Which of these is true of a web server? (a) is where we type code (b) has an address bar (c) hosts websites online (d) opens web pages for us
  13. 13.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) <body>
  14. 14.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  15. 15.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>Fun facts</h3>
    <h3>My pets</h3>
  16. 16.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) height (d) src
  17. 17.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) height (d) src
  18. 18.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as 5 spaces (d) as one space
  19. 19.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
  20. 20.True or false: <ul> has a closing tag. (a) False (b) True
  21. 21.True or false: in <img>, src sets how wide it is. (a) False (b) True
  22. 22.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) games.html (b) Visit the site (c) href (d) Contact us
  23. 23.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) </h3> (d) <\h3>
  24. 24.True or false: a code editor shows line numbers. (a) False (b) True
  25. 25.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
  26. 26.True or false: <ul> is one item of a list. (a) True (b) False
  27. 27.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  28. 28.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Hello, world!</p>
    <p>My pets</p>
  29. 29.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>My pets</p>
  30. 30.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
  31. 31.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h6>? (a) <h6> (b) <h5> (c) <h3> (d) <h4>
  32. 32.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="400">
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Kites fly high</p>
  35. 35.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h6>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
  36. 36.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="150">
    (a) fort.jpg (b) moon.png (c) bus.jpg (d) The full moon
  37. 37.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
  38. 38.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h2> or <h4>? (a) <h2> (b) <h4> (c) <h5> (d) <h3>
  39. 39.True or false: in <img>, height describes the picture. (a) False (b) True
  40. 40.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body

Answer key

  1. map.png
  2. No
  3. <h1>
  4. <ol>
  5. is where we type code
  6. False
  7. <h1>
  8. 4
  9. to leave notes
  10. Hello, world!
  11. <h6>
  12. hosts websites online
  13. <!DOCTYPE html>
  14. <ul>
  15. 3
  16. src
  17. alt
  18. as one space
  19. <ul>
  20. True
  21. False
  22. Contact us
  23. </h3>
  24. True
  25. 1
  26. False
  27. an empty tag
  28. 1
  29. 1
  30. 5
  31. <h3>
  32. an opening tag
  33. 400
  34. 3
  35. <h6>
  36. moon.png
  37. <ol>
  38. <h5>
  39. False
  40. in the body

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