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

Answer key

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

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