Page 68 - TP-Play_V-2.0_Book-8
P. 68

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
            Ensure that an image which we want to insert on the web page should be saved at the same
            location where we have saved our HTML file. If we want to insert an image from any other
            location, we need to provide the complete path of the image to the SRC attribute. For example,
            if our image is saved in the D: drive of computer then the path of the image will be D:\lily.jpg.







             68       Play (Ver. 2.0)-VIII
   63   64   65   66   67   68   69   70   71   72   73