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

Answer key

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

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