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