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