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

Answer key

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

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