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

Answer key

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

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