Tuesday, March 16, 2010

Inline image, using IMG, OBJECT or APPLET.

There are three ways to include inline objects in HTML.
The IMG element is the most common method for using graphics in HTML pages. For faster display, the width and height of the image can be given as attributes. One attribute that is required is alt, used to give an alternate textual string for people browsing with images off, or who cannot see the images. The string cannot contain any markup. A longdesc attribute lets you point to a longer description - often in HTML - which can have markup and richer formatting.
The OBJECT element in HTML can contain other elements nested within it, unlike IMG which is empty. This means that several different formats can be offered, using nested OBJECT elements, with a final textual alternative (including markup, links, etc) right at the center. The outermost element which can be displayed will be used.
The APPLET element is used for embedding applets into the HTML page. These applets can do many things biut o\a common task is to use them to display images, particularly ones in unusual formats or which need to be presented under the control of a program for some other reason.

No comments:

Post a Comment