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

Answer key

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

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