Text styling
In CSS we can cerate our own style for text using the text property. We can define the size of the text. we can change the color of text, change the weight of the text, change the alignment of the text, change the intend of text, also we can change the decoration of the text let see the exaple one by one.
To change the size of the text we can use the following code:
p{font-size:24px;}
To change the color of the text of the we can use the following code:
p{color:#000066;}
h1 {color:#00ff00}
h2 {color:rgb(255,0,0)}
To change the alignment of the text we can use the following code:
p{text-align:center;}
h1 {text-align:center}
p.date {text-align:right}
p.main {text-align:justify}
To change the weight of the text we can use the following code:
p{font-weight:bold;}
p{font-weight:normal;}
p{font-weight:bolder;}
To change the text indent we can use the following code:
p{text-indent:20px;}
To change the transformation of the text we can use the following code:
p.uppercase {text-transform:uppercase}
p.lowercase {text-transform:lowercase}
p.capitalize {text-transform:capitalize}
And finally last but not the least to change the decoration of the text we can use the following code:
h1 {text-decoration:overline}
h2 {text-decoration:line-through}
h3 {text-decoration:underline}
h4 {text-decoration:blink}
Using this text property we can give our text a new look and also segregate the content like heading paragraph and so on.