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