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

Answer key

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

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