Page 118 - CA_165_V2.0_Flipbook
P. 118

OR

                    <IMG WIDTH="300" SRC="C:\dolphin.JPG">

                  HEIGHT Attribute
                  This attribute is used to specify the height of the image in pixels or percentage, in comparison to its
                  original size. Syntax to use the HEIGHT attribute of the <IMG> tag is as follows:

                    <IMG HEIGHT = "Value/Percentage">
                  For example:

                    <IMG HEIGHT="350" SRC="C:\dolphin.JPG">

                    <IMG HEIGHT="75%" SRC="C:\dolphin.JPG">
                  The following HTML code uses the <IMG> tag with various attributes such as SRC, ALIGN, BORDER,
                  WIDTH, and HEIGHT:
                  <HTML>

                  <HEAD>
                  <TITLE> WORKIGN WITH IMAGES </TITLE>
                  </HEAD>
                  <BODY BGCOLOR ="YELLOW">

                  A dolphin is a highly intelligent marine mammal known for its playful behavior
                  and social nature.
                  <IMG SRC="Dolphin.JPG" ALIGN = RIGHT BORDER =3 WIDTH = 300 HEIGHT = 300 >
                  </BODY>
                  </HTML>
                  The HEIGHT attribute of <IMG> tag is supported in HTML5.

                  The output of the preceding HTML code is as follows:














                           Image with a border
                          of size 3, width of 300,
                            height of 300, and
                          alignment to the right.







                           Notes


                          The HEIGHT attribute of <IMG> tag is supported in HTML5.



                   116   Touchpad Computer Applications-X
   113   114   115   116   117   118   119   120   121   122   123