Page 65 - Trackpad_V1_Book 7_Flipbook
P. 65

IMAGES WITH CSS


                 We can use CSS to control the display of the image. To control the display of the image we can set
                 the following image properties using CSS:

                     Border: To set the width of an image border.
                     Height: To set the height of an image.

                     Width: To set the width of an image.
                     -Moz-Opacity: To set the opacity of an image.
                 Write HTML code to set properties of an image using CSS.

                 <!DOCTYPE HTML>

                 <HTML>
                     <HEAD>
                             <TITLE> Images - CSS </TITLE>
                     </HEAD>

                 <BODY>
                 <H1 ALIGN = "CENTER">Valley of Flowers </H1>
                 <IMG  Style = "Border:10px  Solid  Black;  Height:200px;  Width:250px;

                 -Moz-Opacity:0.4;" src = "D:\Valley_of_Flower.jpg" >
                       <br/>
                 <P> Valley of Flowers National Park is an Indian national park, located
                 in North Chamoli and Pithoragarh, in the state of Uttarakhand and is
                 known  for  its  meadows  of  endemic  alpine  flowers  and  the  variety  of
                 flora.

                 </P>
                 </BODY>
                 </HTML>



                                                                                   Images, Links and Forms in HTML5  63
   60   61   62   63   64   65   66   67   68   69   70