← Images with img, src and alt lesson New set →

HTML Worksheet: Images and Alt Text

HTML and CSS lesson 7: Images with img, src and alt · Set 70 · 40 questions
TalentJR

Code tip (File and words): <img src="file.jpg" alt="what it shows" width="200"> — no closing tag. src = which file to load; alt = words describing it; width / height = size in pixels. If the picture fails, the browser shows the alt text; screen readers read it aloud.

NameDateTime takenScore ___ / 40
  1. 1.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="350">
  2. 2.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="100">
    (a) width (b) kite.png (c) Map of India (d) A red kite
  4. 4.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) height (d) alt
  5. 5.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) Birthday cake (b) A happy dog (c) width (d) cake.jpg
  7. 7.True or false: in <img>, src sets how wide it is. (a) False (b) True
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="150">
    (a) width (b) A red kite (c) kite.png (d) Map of India
  9. 9.True or false: in <img>, alt describes the picture. (a) True (b) False
  10. 10.True or false: in <img>, height shows if the image fails. (a) True (b) False
  11. 11.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <p> (d) <pic>
  12. 12.True or false: in <img>, width tells which image to load. (a) False (b) True
  13. 13.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="150">
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
  15. 15.True or false: in <img>, alt sets how wide it is. (a) False (b) True
  16. 16.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="300">
  17. 17.True or false: in <img>, height sets how wide it is. (a) True (b) False
  18. 18.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) alt (d) height
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="350">
    (a) The full moon (b) moon.png (c) width (d) Our school bus
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) Birthday cake (b) A happy dog (c) cake.jpg (d) width
  21. 21.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
  22. 22.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) width (b) fort.jpg (c) An old fort (d) A tiger asleep
  23. 23.True or false: in <img>, alt tells which image to load. (a) True (b) False
  24. 24.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) src (d) width
  25. 25.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) src (c) height (d) width
  26. 26.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="300">
    (a) dog.jpg (b) cake.jpg (c) map.png (d) Map of India
  27. 27.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="250">
    (a) width (b) Map of India (c) kite.png (d) A red kite
  30. 30.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) src (c) height (d) width
  31. 31.True or false: in <img>, height names the picture file. (a) False (b) True
  32. 32.🖼️ 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) Birthday cake (c) Map of India (d) width
  33. 33.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="50">
    (a) map.png (b) kite.png (c) cake.jpg (d) A red kite
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="350">
    (a) map.png (b) Birthday cake (c) width (d) Map of India
  35. 35.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) moon.png (b) The full moon (c) fort.jpg (d) bus.jpg
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="350">
  37. 37.True or false: in <img>, width sets how wide it is. (a) True (b) False
  38. 38.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) height (d) width
  39. 39.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="250">
  40. 40.True or false: in <img>, src tells which image to load. (a) True (b) False

Answer key

  1. 350
  2. No
  3. A red kite
  4. src
  5. True
  6. Birthday cake
  7. False
  8. A red kite
  9. True
  10. False
  11. <img>
  12. False
  13. 150
  14. 350
  15. False
  16. 300
  17. False
  18. src
  19. The full moon
  20. Birthday cake
  21. to describe the image
  22. An old fort
  23. False
  24. alt
  25. height
  26. map.png
  27. True
  28. 50
  29. A red kite
  30. alt
  31. False
  32. Map of India
  33. kite.png
  34. Map of India
  35. moon.png
  36. 350
  37. True
  38. alt
  39. 250
  40. True

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