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

Answer key

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

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