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

Answer key

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

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