Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 93 - 2626_South Point_C-7
P. 93

    TEXT PROPERTIES

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

                                       Property                                  Value
                               color                      name of the colour

                               text-align                 left, right, center, justify
                               text-indent                length in pixels or percentage
                               text-decoration            underline, overline or line-through
                               text-transform             capitalize, uppercase, lowercase and none

                     color

                     It specifies the text colour to be used on the web page.
                     Example:

                     <P STYLE="COLOR: RED;">This text is red.</P>

                     text-align

                     It specifies the alignment of the text.
                     Example:

                     <P STYLE="TEXT-ALIGN: CENTER;">This text is centered.</P>

                     text-indent
                     It specifies the indentation of the first line of the text.

                     Example using length values:
                     <P STYLE="TEXT-INDENT: 20px;">This text has an indentation of 20 pixels.</P>

                     Example using percentages:
                     <P STYLE="TEXT-INDENT: 30%;"> This is a paragraph with text indent set to 30%.</P>

                     text-decoration
                     It specifies text effects like underline, overline, or line-through.

                     Example:
                     <P STYLE="TEXT-DECORATION: UNDERLINE;">This text is underlined.</P>

                     text-transform

                     It specifies the transformation of text into uppercase, lowercase, or title case.

                     Example:
                     <P STYLE="TEXT-TRANSFORM: UPPERCASE;">This text is in uppercase.</P>

                                                                                                 Using CSS in HTML5    91

| 88 89 90 91 92 93 94 95 96 97 98 |