Tuesday, October 12, 2010

CSS Text

In addition to the different properties of CSS sources, there are other properties that may help in the style of text. e.g: you can change the color of the text, align text, add the internal features and more.

CSS Text can be styled using the properties listed below.

CSS Text Color
<p style="color:#FF0000;">This CSS text color is red</p>

This results in:
This CSS text color is red

CSS Text Align
<p style="text-align:center;">This CSS text is aligned center</p>


This results in:
This CSS text is aligned center

CSS Letter Spacing
<p style="letter-spacing:10px;">This text has letter spacing applied</p>


This results in:
This text has letter spacing applied

CSS Word Spacing
<p style="word-spacing:20px;">This text has word spacing applied</p>


This results in:
This text has word spacing applied

CSS Text Transform
<p style="text-transform:capitalize;">this text has been capitalized.</p>
<p style="text-transform:lowercase;">THIS TEXT HAS BEEN TRANSFORMED TO LOWERCASE</p>
<p style="text-transform:uppercase;">This text has been transformed to uppercase</p>

This results in:
this text has been capitalized.
THIS TEXT HAS BEEN TRANSFORMED TO LOWERCASE
This text has been transformed to uppercase

CSS Text Decoration
<p style="text-decoration:blink;">This text is blinking</p>
<p style="text-decoration:underline;">This text has a line underneath</p>
<p style="text-decoration:overline;">This text has a line over the top</p>
<p style="text-decoration:line-through;">This text has a line through the middle</p>

This results in:
This text is blinking
This text has a line underneath
This text has a line over the top
This text has a line through the middle

No comments:

Post a Comment