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

Answer key

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

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