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