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