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