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