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

Answer key

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

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