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

Answer key

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

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