Page 116 - CA_165_V2.0_Flipbook
P. 116

SRC Attribute
                  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">
                  For example:
                    <IMG SRC = "C:\dolphin.JPG">

                  ALIGN Attribute
                  This attribute is used to align the text and images according to the specified position on the displayed
                  page.

                  The following table lists the values of the ALIGN attribute, its possible values, and a description of its
                  purpose:

                     Value                                          Description

                              Aligns the image to the left side of its container. Text or other content will wrap around the
                   left
                              image.

                              Aligns the image to the right side of its container. Text or other content will wrap around
                   right
                              the image.

                   top        Aligns the image to the top of the surrounding text or container.

                   middle     Vertically aligns the image in the middle of the surrounding text or container.

                   bottom     Aligns the image to the bottom of the surrounding text or container.


                  Syntax to use the ALIGN attribute of the <IMG> tag is as follows:

                    <IMG ALIGN = "TOP/MIDDLE/BOTTOM/LEFT/RIGHT">
                  For example:

                    <IMG SRC= "C:\dolphin.JPG" ALIGN= "MIDDLE">

                    <IMG SRC= "C:\dolphin.JPG" ALIGN= "RIGHT">
                  The following HTML code uses the <IMG> tag to display an image of a dolphin, with the SRC attribute
                  specifying the image source:


                  <HTML>
                  <HEAD>

                  <TITLE>WORKING WITH IMAGES </TITLE>
                  </HEAD>

                  <BODY BGCOLOR = "YELLOW">
                  <P>

                  Dolphins  are highly intelligent  marine mammals belonging  to the family
                  Delphinidae. They are known for their playful behavior, social structures,
                  and remarkable communication skills.


                   114   Touchpad Computer Applications-X
   111   112   113   114   115   116   117   118   119   120   121