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

Answer key

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

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