Page 87 - CA 165 ver 1.0 Class 10
P. 87

MORE ABOUT HTML                                                     3








                 A web page should be designed in such a way that a user can identify or read the content easily.

                 The document of the web page can be formatted and made attractive with the help of different
                 tags of HTML and by including images, links, colours, etc. In this chapter, we will learn about tags
                 that help to format, insert and link the web pages.
                 Graphics, images, photographs, all these visual elements make a web page more attractive and
                 give unique look. These virtual elements enhance the presentation of the web page for its items

                 which allures and attracts the users to browse. Other than the text matter, HTML helps to display
                 static or animated images on the web pages. It accepts the image in file formats with extensions.
                 GIF (Graphics Interchange Format),. JPEG (Joint Photographic Experts Group) or .BMP (Bit Map)
                   <IMG> TAG

                 The <IMG> (Image) tag is an empty tag. The attribute SRC (Source) is used with the IMG tag to
                 specify the location and name of the image file. The <P> tag should be placed before the <IMG>
                 tag because the <IMG> tag does not form a new block element and would appear in the same
                 line unless we add <P> tag. A blank line appears before and after the image when the image
                 insention tag <IMG> is enclosed within <P> and </P> tags. Syntax to use the <IMG> tag is as
                 follows:

                 <IMG SRC=“Image  file” ALIGN=“Value”  BORDER=“Value”  WIDTH=“Value”
                 HEIGHT=“Value” HSPACE=“Value”   VSPACE=“Value”   ALT=“Text”>
                 For example:

                 <P><IMG SRC= “FLOWER.GIF”></P>
                         Notes
                         Images are sometimes referred to as inline images because these are inserted within a line of
                         body text in a web page with the help of <IMG> (Image) tag.

                 Attributes of <IMG> Tag

                 The following attributes are used with <IMG> tag:
                   SRC                ALIGN             BORDER             WIDTH

                   HEIGHT             HSPACE            VSPACE             ALT

                 SRC
                 This attribute specifies the location (source) of the image file (.GIF, .JPG or .BMP file). Syntax to use
                 the SRC attribute of the <IMG> tag is as follows:

                   <IMG SRC = “Image File with URL”>

                                                                                            More About HTML      85
   82   83   84   85   86   87   88   89   90   91   92