Page 90 - Plus_V2.2_C7_Flipbook
P. 90

<!DOCTYPE html>
                   <HTML>
                   <HEAD>
                           <STYLE>
                           body
                           {
                           background-color: cyan;
                           }
                           h1
                           {
                           color: red;
                           }
                           h2
                           {
                           color: green;
                           }
                                                                                  Using internal style sheet
                           </STYLE>
                           <TITLE>Internal Style Sheet</TITLE>
                   </HEAD>
                   <BODY>
                           <H1>Cascading Style Sheet</H1>
                           <H2>Linking Internal Style Sheet</H2>
                   </BODY>
                    </HTML>


                       Inline Style
                  An inline style is used to apply a unique style for a single element using the style attribute. Syntax for
                  inline style is as follows:

                  Syntax: <ELEMENT STYLE="PROPERTY1: VALUE; PROPERTY2: VALUE; ...">
                  Here's an example using the <P> (paragraph) element with an inline style:
                  <P style="color: blue;text-align: center">This is a paragraph with inline styles.</P>
                  In this example, <P> is the paragraph element and style="color: blue; text-align: center;" is the inline
                  style attribute. It sets the text color to blue and aligns the text to the center.


                    <!DOCTYPE html>
                   <HTML>
                   <HEAD>
                       <TITLE>Inline Style Sheet</TITLE>
                   </HEAD>
                   <BODY>
                       <H1 STYLE="COLOR: BLUE; MARGIN-LEFT: 20PX;">Cascading Style Sheet</h1>
                       <H2 STYLE="COLOR : GREEN; MARGIN-LEFT: 30PX;">Inline Style Sheet</h2>
                   </BODY>
                    </HTML>

                  88    Premium Edition-VII
   85   86   87   88   89   90   91   92   93   94   95