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

Answer key

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

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