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

Answer key

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

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