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