Page 82 - Chinmaya_C6_flipbook
P. 82

For Example:
                  <BODY STYLE=”BACKGROUND-COLOR:RED; COLOR:RED”>
                  TEXT IN RED COLOUR
                  </BODY>
                  INTERNAL CSS
                  Internal CSS allows us to define the style for a single HTML page. It is defined using the <STYLE> tag
                  in the head section of the HTML page.

                  For Example:
                  <HEAD>
                  <STYLE>                                         Primary language for webpage designing
                  H1 {COLOR:RED;}
                  H2 {COLOR:GREEN;}
                  BODY {BACKGROUND-COLOR:YELLOW}
                  </STYLE>
                  </HEAD>
                  <BODY>
                   <H1>This is a heading level 1 (H1)</H1>
                   <H2>This is a heading level 2 (H2)</H2>
                  </BODY>
                  </HTML>
                  This code will display the H1 heading in red and H2 in green colour on the webpage.

                  EXTERNAL CSS

                  External CSS allows us to define the style for many webpages by using a single CSS file. An external
                  style sheet is a separate file that can be written in any text editor. It does not contain any HTML
                  code and is saved with .css as the extension. 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
                  the external stylesheet is:
                  <HEAD>
                  <LINK REL=“STYLESHEET” TYPE=“TEXT/CSS” HREF=“NAME OF STYLE SHEET”>
                  </HEAD>
                  Where the HREF attribute contains the path of the stylesheet.




                            USE OF INLINE CSS WITH HTML5 TAGS

                  You know the inline CSS and its basic syntax. Let us learn more about them.
                  Syntax to set multiple properties:

                  <TAGNAME STYLE = “PROPERTY1:VALUE; PROPERTY2:VALUE; PROPERTY3:VALUE;”>














                   80   Premium Edition-VI
   77   78   79   80   81   82   83   84   85   86   87