Page 39 - modular_v2.0_HTML&_CSS_Fb
P. 39

Syntax:

                 BORDER-COLOR: COLOUR_NAME;
                 OR
                 BORDER-COLOR: COLOUR_VALUE;

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

                 <!DOCTYPE HTML>
                 <HTML>
                 <HEAD>

                 <TITLE>Border color</TITLE>

                 </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 customised to have different width in each side.

                 Syntax:  BORDER-WIDTH: WIDTH_VALUE;
                 Let us create a web page to set border width.

                 <!DOCTYPE HTML>
                 <HTML>

                                                                                                                37
                                                                                        Cascading Style Sheets
   34   35   36   37   38   39   40   41   42   43   44