Page 116 - CodePilot V5.0 C6
P. 116

The syntax to define Inline CSS is as follows:

                  <TAG_NAME STYLE="PROPERTY:VALUE;">

                     Code      Write the HTML code to present the given web page using the STYLE attribute.
                       1

                  <!DOCTYPE HTML>

                  <HTML>
                  <HEAD>

                  <TITLE> Inline CSS</TITLE>

                  </HEAD>

                  <BODY>
                  <H1 STYLE="COLOR: GREEN;">

                  The Role of Plants</H1>

                  <P STYLE="BACKGROUND-COLOR: YELLOW; COLOR: BLUE;">
                  Plants are essential for the survival of life on                             SHORT SIGN
                  Earth, as they provide oxygen, food and shelter.
                  </P>                                                                         To refresh the web
                                                                                                 page: Ctrl + R
                  </BODY>

                  </HTML>

                  INTERNAL CSS

                  Internal CSS is written inside the <STYLE> tag in the <HEAD> section. Styles apply to all elements
                  of the same type.

                  For example, a style for <H1> affects all <H1> headings on the page.
                  The syntax to define internal CSS is as follows:

                                                                                     CSS is like the colour and
                  <HEAD>
                                                                                     texture of a flower or leaf,
                  <STYLE>
                                                                                    which enhances the plant’s
                  SELECTOR { PROPERTY: VALUE; }                                            visual appeal.

                  </STYLE>
                  </HEAD>

                     Code
                       2       Write the HTML code to present the given web page using internal CSS.


                  <!DOCTYPE HTML>
                  <HTML>




                   114
                        CodePilot (V5.0)-VI
   111   112   113   114   115   116   117   118   119   120   121