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