|
|
|
CSS Text Styles
|
|
Besides adding style to your background, CSS also allows you to style the text of your HTML document. This it does by offering various text styling properties like, text color, alignment, decoration & other such properties. These styling options are advancement on the traditional HTML styling using tag.
Text Color
This property is used to specify the color of the text either as Generic name, RGB or hexadecimal notation.
Example: body {color:blue;} |
|
|
|
|
Text Alignment
This property is used to define the horizontal alignment of the text to either left, right, center or justify.
Example: h1 {text-align:center;} |
Text Decoration
This property is used to either set or remove decorations from text. This is mostly done to remove underlines from links.
Example: h1 {text-decoration:none;} |
Text Indentation
The text indent property is used to indent your paragraphs without using HTML or adding spaces manually.
Example: p {text-indent: 20px;}
|
Text Transformation
This is a great way to specify the lower &upper case letters in the text.
Example: p.uppercase {text-transform:uppercase;} |
Letter Spacing
This property is used to specify the spacing between characters in the text.
Example: h1 {letter-spacing: 6px;} |
|
|
|
|
|
|
|
|
|
|
|
|