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

Answer key

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

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