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

Answer key

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

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