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

Answer key

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

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