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

Answer key

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

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