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

Answer key

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

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