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