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