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

Answer key

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

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