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