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