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

Answer key

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

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