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

Answer key

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

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