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

You can also use a hexadecimal code to specify the background color.

                 Syntax:
                 BACKGROUND-COLOR: #VALUE;

                 (e.g., #FF0000, #008000, etc.)
                    BORDER PROPERTIES

                 The CSS border properties enable to specify the style, width and color of a border.
                 Border Style


                 The BORDER-STYLE property specifies the outline style of border. Some of the outline styles of
                 border are:
                    Name of the
                                               Defines                         Look of Border Style
                    Border Style
                  Dotted               Dotted Border

                  Dashed               Dashed Border

                  Solid                Solid Border

                  Double               Double Border
                  Groove               3D Grooved Border

                  Ridge                3D Ridged Border

                  Inset                3D Inset Border
                  Outset               3D Outset Border

                  None                 No Border

                  Hidden               Hidden Border

                 Syntax:       BORDER-STYLE: NAME_OF_THE_BORDER;
                 Let us create a web page to use the border style.
                 <!DOCTYPE HTML>

                 <HTML>
                        <HEAD>
                        <TITLE>Borders</TITLE>

                        </HEAD>
                               <BODY>
                        <P STYLE="BORDER-STYLE:NONE;">
                               NO BORDER IS SELECTED.</P>

                        <P STYLE="BORDER-STYLE:SOLID;">
                               THIS IS A SOLID BORDER.</P>
                        <P STYLE="BORDER-STYLE:DASHED;">

                               THIS IS A DASHED BORDER.</P>                            Using border styles
                                                                                                                35
                                                                                        Cascading Style Sheets
   32   33   34   35   36   37   38   39   40   41   42