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

Answer key

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

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