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