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