Page 19 - PortGPT_V2.1_C8_Flipbook
P. 19

•  WIDTH: It specifies the width of the image in the web page. For example,

                     <IMG SRC="lily.jpg" WIDTH="50%">
                 •  HEIGHT: It specifies the height of the image in the web page. For example,

                     <IMG SRC="lily.jpg" HEIGHT="60%">
                 •  ALIGN: It aligns the image with respect to the text placed adjacent to the image. Image can be
                     aligned left, right, middle, bottom and top. For example,

                     <IMG SRC="lily.jpg" ALIGN="right">
                 •  BORDER: It specifies the thickness of the border surrounding the image.

                     <IMG SRC="lily.jpg" BORDER="2">
                 •  ALT: It specifies the alternate text to be displayed in the web browser, if the provided image is
                     not found. For example,

                     <IMG SRC="lily.jpg" ALT="Describing the flower">
                 Let us use the <IMG> tag to insert an image on the web page in the following way:

                 <HTML>

                 <HEAD> <TITLE> Inserting Image </TITLE>
                 </HEAD>
                 <BODY>

                 <B> Inserting image on the web page </B>
                 <IMG SRC="lily.jpg"

                 WIDTH="200px"
                 HEIGHT="200px"
                 ALIGN="right"

                 BORDER="2">
                 </BODY>

                 </HTML>
























                                                      Image inserted with border



                                                                                 Images, Links, Audio, Video in HTML  17
   14   15   16   17   18   19   20   21   22   23   24