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