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

Answer key

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

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