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

Answer key

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

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