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