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