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