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