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