← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 913 · 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.True or false: <h1> has a closing tag. (a) True (b) False
  2. 2.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  3. 3.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ol>
  4. 4.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  5. 5.True or false: HTML on its own can make links to pages. (a) False (b) True
  6. 6.📋 What number does the browser show next to “Grapes”?
    <ol start="6">
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  7. 7.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
  8. 8.🔍 Which is the odd one out? (a) saves our .html files (b) stores a website’s files (c) is where we type code (d) colours code to help us
  9. 9.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  10. 10.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  11. 11.Which of these is an opening tag? (a) </li> (b) </b> (c) </title> (d) <h1>
  12. 12.Which of these has a closing tag? (a) <img> (b) <meta> (c) <input> (d) <h1>
  13. 13.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
  14. 14.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>My best friend</p>
    <h2>My pets</h2>
    <p>The red kite</p>
    <h2>I love mangoes.</h2>
  15. 15.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  16. 16.True or false: in <img>, width sets how tall it is. (a) True (b) False
  17. 17.True or false: a web browser is where we type code. (a) False (b) True
  18. 18.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Kites fly high<br>Stars shine</p>
  19. 19.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>Good morning!</p>
    (a) The red kite (b) Our school trip (c) Good morning!
  20. 20.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h6> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h6>
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="300">
    (a) Birthday cake (b) map.png (c) Map of India (d) width
  22. 22.🔍 One closing tag is missing. Which one?
    <i>Fun facts</i>
    <h2>I love mangoes.</h2>
    <h1>My pets
    (a) </i> (b) </b> (c) </h1> (d) </h2>
  23. 23.Which of these is true of a web browser? (a) stores a website’s files (b) hosts websites online (c) sends pages over the net (d) opens web pages for us
  24. 24.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) Contact us (b) href (c) contact.html (d) About us
  25. 25.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="350">
    (a) Birthday cake (b) map.png (c) Map of India (d) width
  26. 26.🔍 Which is the odd one out? (a) opens web pages for us (b) colours code to help us (c) is where we type code (d) saves our .html files
  27. 27.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) src (d) alt
  28. 28.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) maths.html (b) https://example.com (c) Maths fun (d) contact.html
  29. 29.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine<br>Sky is blue<br>Birds sing<br>Roses are red</p>
  30. 30.Which of these has a closing tag? (a) <img> (b) <meta> (c) <ul> (d) <input>
  31. 31.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) Maths fun (b) href (c) games.html (d) Visit the site
  32. 32.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) element (d) editor
  33. 33.🔗 Where does this link open?
    <a href="maths.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  34. 34.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
  35. 35.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a link (d) a picture
  36. 36.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
  37. 37.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
  38. 38.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h5> (d) <h6>
  39. 39.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) </h3> (c) <\h3> (d) <h3>
  40. 40.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="100">
    (a) cake.jpg (b) Map of India (c) dog.jpg (d) map.png

Answer key

  1. True
  2. an opening tag
  3. 4
  4. a closing tag
  5. True
  6. 9
  7. </h2>
  8. stores a website’s files
  9. 2
  10. No
  11. <h1>
  12. <h1>
  13. 1
  14. 3
  15. opens it in a new tab
  16. False
  17. False
  18. 4
  19. Our school trip
  20. <h6>
  21. Map of India
  22. </h1>
  23. opens web pages for us
  24. About us
  25. Map of India
  26. opens web pages for us
  27. width
  28. contact.html
  29. 5
  30. <ul>
  31. Visit the site
  32. element
  33. in the same tab
  34. 2
  35. a line across the page
  36. href
  37. the body
  38. <h6>
  39. </h3>
  40. map.png

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