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