Page 85 - trackpad v5.1 class 6 flipbook
P. 85

HTML5 provides various methods to format text on a webpage and makes it easy to alter the
                 style of individual elements on a webpage. Cascading Style Sheets (CSS) is a convenient method
                 of style the elements of a webpage. It controls various elements like the colour, font, text size,
                 etc. within a single page or the entire website. CSS can also be used to change the look of any
                 webpage elements such as paragraphs, lists, backgrounds, etc.

                 Every webpage on a website can be linked to a single style sheet, hence, any change made to the
                 style sheet formatting affects every HTML document linked to the sheet. We can use a style sheet
                 as a template by storing all the information in one place and easily change the appearance of our
                 site in one go, thus saving a lot of time in case your site has numerous pages.



                           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
                                                                    webpage.
                                           left, right, center,
                  text-align                                        Specifies the alignment of the text.
                                           justify
                                           length in pixels or      Specifies the indentation of the first line of the
                  text-indent
                                           percentage               text.

                                           underline,  overline  or  Specifies the text effects like underline,
                  text-decoration
                                           strikethrough            overline or strikethrough.


                                           capitalise,  uppercase,  Specifies  the  transformation  of text  into
                  text-transform
                                           lowercase and none       uppercase, lowercase or title case.


                 Create an HTML webpage by using the text properties.
                 <!DOCTYPE html>
                 <HTML>
                 <HEAD> <TITLE>Text Properties</TITLE>

                 <STYLE>
                 H1{font-family:Comic Sans MS; text-align:center;
                 text-decoration:underline;color:red}
                 </STYLE>
                 </HEAD>
                 <BODY>
                 <H1>Energy</H1>


                                                                                            Formatting a Webpage  83
   80   81   82   83   84   85   86   87   88   89   90