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