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