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