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