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