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