Text Color
It is used to set the color of the text. The color is specified by using color property:
h1 {
h2 {
- name - a color name, like "red"
- RGB - an RGB value, like "rgb(125,0,123)"
- Hex - a hex value, like "#cococo"
body {
color:blue;
}
h1 {
color:#00ff00;
}
h2 {
color:rgb(255,0,0);
}
Text Alignment
We use text alignment property to give the alignment of our text to which we apply this. It can be a left,right,center.
.text{
text-align:right;
}
Text Decoration
We use text decoration property to provide or remove a decoration like (underline,streak [line-through] ,blink etc.)
h1 {
text-decoration:overline;
}
h3 {
text-decoration:underline;
}
h4 {
text-decoration:blink;
}
Text Transformation
This property is used to give an uppercase or lowercase to tect we apply this property or Just simply capitalize the first letter of every line.
.text {
text-transform:uppercase;
}
.text {
text-transform:capitalize;
}
.text {
text-transform:lowercase;
}
Text Indentation
This is simple, we can also indent para or line by the help of this property.
#text {
text-indent:20px;
}
No comments:
Post a Comment