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