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