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

Answer key

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

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