Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 96 - 2611_SmartGPT Pro V(5.0) C-6
P. 96

    Plants are essential for the survival of life on
                      Earth, as they provide oxygen, food and shelter.
                                                                                                 Short key
                      </P>                                                                           To refresh the web
                                                                                                            page:
                      </BODY>
                      </HTML>                                                                            Ctrl +   R

                      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:

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

                      </HEAD>

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

                      <!DOCTYPE HTML>
                      <HTML>

                      <HEAD>
                      <TITLE>Internal CSS</TITLE>

                      <STYLE>
                      BODY {

                      BACKGROUND-COLOR: LIGHTGREEN; }
                      H1 { COLOR: BROWN; TEXT-ALIGN: CENTER; }
                      P { COLOR: BLUE; }

                      </STYLE>

                      </HEAD>
                      <BODY>
                      <H1>Water Conservation</H1>

                      <P>We should conserve water to protect our planet. Every drop matters
                      and every effort creates an impact.

                      Together, we can safeguard our precious water resources. </P>
                      </BODY>
                      </HTML>

                       94   Computer Science (V5.0)-VI

| 91 92 93 94 95 96 97 98 99 100 101 |