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