CSS Text

Text Color :

The color house is used to create the colour of the text.
With CSS, a color is usually specified by:

  • a HEX value – like “#ff0000”
  • an RGB value – like “rgb(255,0,0)”
  • a color name – like “red”

  • The default color for a page is defined in the body selector.


    Example :

    body {color:blue;}
    h1 {color:#00ff00;}
    h2 {color:rgb(255,0,0);}

    Text Alignment :

    The text-align property is employed to set the horizontal position of a text.
    Text can be focused, or arranged to the left or proper, or justified.
    When text-align is set to “justify”, each point is stretched therefore that each point has identical width, and the left and proper prices are right.

    Example :

    h1 {text-align:center;}
    p.date {text-align:right;}
    p.main {text-align:justify;}

    Text Decoration :

    The text-decoration property is employed setting or eliminate accessories from text.
    The text-decoration property is mainly applied to eliminate underlines from links for style purposes:

    Example :

    a {text-decoration:none;}

    Text Transformation :

    The text-transform property is used to establish uppercase and lowercase words in a text.
    It may be used to show everything in to uppercase or lowercase words, or capitalize the very first page of each word.

    Example :

    p.uppercase {text-transform:uppercase;}
    p.lowercase {text-transform:lowercase;}
    p.capitalize {text-transform:capitalize;}

    Text Indentation :

    The text-indentation property is used to specify the indentation of the first line of a text.

    Example :

    p {text-indent:50px;}
    Posted in CSS

    Leave a Reply

    Your email address will not be published. Required fields are marked *