Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 48 - 2607_Trackpad_Pro_5.1_flipbook_C6
P. 48

    HTML5 provides various methods to format text on a web page and makes it easy to alter the                                <P style="font-family:Times New Roman; text-transform:uppercase"> Energy
                      style of individual elements on a web page. Cascading Style Sheets (CSS) is a convenient method                           is the capacity for doing work. It may exist in potential, kinetic,thermal,
                      of styling the elements of a web page. It controls various elements like the colour, font, text size,                     electrical, chemical, nuclear, or other various forms.</P>
                      etc. within a single page or the entire website. CSS can also be used to change the look of any web                       <hr style="width:80%; height: 10px; background-color:grey;"
                      page elements such as paragraphs, lists, backgrounds, etc.                                                                <P style="font-family:Times New Roman; text-transform:lowercase">

                      Every webpage on a website can be linked to a single style sheet, hence, any change made to the                           Energy is a requirement in our everyday life as a way of improving
                      style sheet formatting affects every HTML document linked to the sheet. We can use a style sheet                          human development leading to economic growth and productivity.</P>
                      as a template by storing all the information in one place and easily change the appearance of our                         </BODY>
                      site in one go, thus saving a lot of time in case your site has numerous pages.                                           </HTML>

                                TEXT PROPERTIES

                      Text properties are used to change the appearance of the text. The text properties and their
                      values used with the style attribute are given below:

                             Property                   Value                              Description

                                                                          Specifies the text colour to be used on the
                       color                    Name of the colour
                                                                          web page
                                                left, right, center,
                       text-align                                         Specifies the alignment of the text
                                                justify                                                                                                                  Which CSS property is used to align the text?

                                                length in pixels or       Specifies the indentation of the first line of the                            uiz    Bee       _________________________________________________________________
                       text-indent
                                                percentage                text

                                                underline, overline or    Specifies the text effects like underline,
                       text-decoration
                                                linethrough               overline or linethrough
                                                                                                                                                          BACKGROUND PROPERTIES

                                                capitalize, uppercase,  Specifies  the  transformation  of text  into
                       text-transform                                                                                                           The background properties are used to make changes to the background of an HTML element.
                                                lowercase and none        uppercase, lowercase or title case                                    The various background properties and their values are given in the table.

                      Create an HTML web page by using the text properties.
                                                                                                                                                        Property                       Value                             Description
                      <!DOCTYPE html>
                      <HTML>
                      <HEAD> <TITLE>Text Properties</TITLE>                                                                                                                                                  Specifies  the  background  colour  to
                                                                                                                                                 background-color           Name of the colour
                      <STYLE>                                                                                                                                                                                be used on the web page
                      H1{font-family:Comic Sans MS; text-align:center;                                                                                                                                       Specifies the image to be used in the
                                                                                                                                                 background-image           URL of image
                      text-decoration:underline;color:red}                                                                                                                                                   background on the web page
                      </STYLE>
                                                                                                                                                                            repeat, repeat-x, repeat-y,
                      </HEAD>                                                                                                                                                                                Specifies the repetition of an image
                                                                                                                                                 background-repeat          (whereas, x- horizontal &
                      <BODY>                                                                                                                                                                                 on the web page
                                                                                                                                                                            y-vertical) no repeat
                      <H1>Energy</H1>

                       46   Premium Edition-VI

| 43 44 45 46 47 48 49 50 51 52 53 |