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

Answer key

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

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