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