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