Page 82 - TP_Pluse_V2.2_Class_6
P. 82

Inline Style Sheet

                  An inline style is used to apply a unique style for a single element. The style attribute an element allows
                  you to create and apply a style on the element. Syntax to create an inline style is:

                  <element style = "property1:value1; property2:value2; … ….">
                  where the element is any valid HTML tag and style is the global attribute of HTML used by all the tags
                  in HTML. The style attribute contains all the CSS properties and their values within double-quotes. For

                  example:

                  <body style="background-color:green; color:white">
                  Text in white colour

                  </body>

                  Internal Style Sheet

                  CSS design can also be applied into a HTML document by using <STYLE> tag. This tag should be placed
                  inside the <HEAD> and </HEAD> tags. An internal style sheet is commonly used when one web page
                  has a unique style. For example:

                  <head>
                  <style>

                  body{background-color:green; color:white;}
                  </style>

                  </head>
                  <body>

                  Text in white colour
                  </body>

                  External Style Sheet

                  In case of external stylesheet, the CSS styles are written in a separate file which is saved with .css
                  extension. To apply a rule to multiple pages, an external style sheet is used. You need to include a
                  reference to the external style sheet file within the <LINK> element inside the <HEAD> element. Syntax

                  to include the reference of external stylesheet is:

                  <head>
                  <link rel=“stylesheet” type=“text/css” href=“name of style sheet”>
                  </head>
                  Where, HREF attribute contains the path of the stylesheet. For example, if you have saved the file in
                  which styles are written with the name style.css, then the code will be:

                  <head>

                  <link rel=“stylesheet” type=“text/css” href="style.css">
                  </head>
                  80    Plus (Ver. 2.2)-VI
   77   78   79   80   81   82   83   84   85   86   87