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

Answer key

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

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