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

Answer key

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

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