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

Answer key

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

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