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

Answer key

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

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