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

Answer key

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

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