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