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