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