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

Answer key

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

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