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

Answer key

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

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