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