You are on page 1of 1

IMAGES IN HTML

A. Fill in the blanks:

1. Images can be added to the document with the help of <img> tag.
2. The alt attribute lets you specify text as an alternate to the image.

B. Answer in one word or a sentence.

1. Name the tag which inserts an inline image on the web page.
Ans. <img> tag.

2. Name the attribute of <img> tag that specifies the text as an alternative to the image.
Ans. Alt attribute.

C. Answer the following questions:

1. How are images added in an HTML document? What are the different attributes of an
image element?
Ans. The <img> tag is used to add images in an HTML webpage. It is an empty tag and
requires different attributes to be specified with it. The different attributes of <img> tag are-
src, alt, height, width, etc.

2. What is the importance of associating an alternate text with an image?

Ans. The Alt attribute displays text as an alternative to the image. Sometimes, a browser on
the user’s computer does not display images due to some reasons (maybe because of slow
connection or error in the src attribute). In that case, you can display the text to describe the
image. The only purpose of ALT attribute is to describe the contents of an image file. It is
generally used in case the user has a text – based browser on his computer, such as Lynx. It
also proves to be useful when the user is a blind surfer for whom the browser is programmed
to read aloud the alternative text browsers or user settings that do not support automatic
loading of images. In such cases as well, the ALT attribute is used.

You might also like