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

Answer key

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

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