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

Answer key

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

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