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

Answer key

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

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