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

Answer key

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

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