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