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