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