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

Answer key

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

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