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