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