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