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

Answer key

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

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