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

Answer key

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

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