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

Answer key

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

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