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

Answer key

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

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