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