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

Answer key

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

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