Page 87 - Modular_V1.1_Flipbook
P. 87

Let us create a web page to change the border colour.

                 <HTML>
                     <HEAD>
                     </HEAD>
                         <BODY>

                        <P STYLE="BORDER-COLOR:RED; BORDER-STYLE:SOLID;">
                            THIS IS A SOLID BORDER OF SINGLE COLOUR RED.</P>
                           <P STYLE="BORDER-BOTTOM-COLOR:GREEN;
                              BORDER-TOP-COLOR:RED;

                              BORDER-LEFT-COLOR:BLACK;
                              BORDER-RIGHT COLOR:BLUE;BORDER-STYLE:SOLID;">
                           THIS IS A SOLID BORDER OF DIFFERENT COLOURS.</P>
                 </BODY>

                 </HTML>

















                                                          Using border colour
                 Border Width


                 The ‘border-width’ property enables to set the width of a border. The value width could be either
                 a length in ‘px’, ‘pt’ or ‘cm’ or it should be set to thin, medium or thick. All the four sides of a
                 border can also be individually customized to have different width in each side.
                 Syntax:  <P STYLE = “BORDER-WIDTH: Value of Width; BORDER-STYLE: Name of the
                 Style;”>

                           Text
                           </P>

                 Let us create a web page to set border width.
                 <HTML>
                     <HEAD>
                     </HEAD>

                        <BODY>
                        <P STYLE="BORDER-WIDTH:4PX; BORDER-COLOR:VIOLET; BORDER-STYLE:SOLID;">
                           THIS IS AN EXAMPLE OF SOLID BORDER WHOSE WIDTH IS 4PX.  </P>


                                                                                          Cascading Style Sheets  85
   82   83   84   85   86   87   88   89   90   91   92