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

Answer key

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

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