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

Answer key

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

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