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