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

Answer key

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

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