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