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