Make Money Online!
Hi, I'm Ben and I own Create a Great Website! I'm currently earning well over $1,500 plus per month online in my spare time, and I want to show you how you can do the same.
Fill out the form below and I'll send you my free guide to create a great website and how you can earn money online just like I do! You won't be disappointed.
Make Money Online!
CSS Tutorials :
CSS Text Formatting
There are many ways of using CSS text formatting to manipulate text elements. The various CSS text formatting properties are listed below.
- Text-color property - used to set the font color of the text
- Text-align property - used to align the text of a paragraph
- Text-decoration property - used to underline, overline, and strikethrough text.
- Text-transform property - used to capitalize text or convert text to uppercase or lowercase letters.
- Text-indent property - used to indent the text of a paragraph
- letter-spacing property - used to add or subtract space between the letters that make up a word
- word-spacing property - used to add or subtract space between the words of a sentence
Text Color
The color property is used to set the color of font in text elements.. The color can be specified by:
- name - a color name, like "red" or "blue"
- RGB - an RGB value, like "rgb(255,0,0)"
- Hex - a hex value, like "#CFCFCF"
The default color for a page is defined in the body selector.
Example
h1 {color:#00FF00;}
h2 {color:rgb(255,0,0);}
Text Alignment
Aligning text with the text-align property should be fairly straight forward. The text-align property is used to set the horizontal alignment of text.
The values for the text-align property are: centered, or aligned to the left or right, or justified. If not specified the default value is left.
When text-align is set to "justify", each line is stretched so that every line has equal width, and the left and right margins are straight (like in magazines and newspapers).
Example of Left - aligns text to the left
Example of Right - aligns text to the right
Example of Centered - aligns text to the middle
non lorem varius dolor faucibus euismod luctus a libero. Suspendisse arcu diam, suscipit id porta in, tristique eget erat. Maecenas vestibulum
urna a metus pretium placerat.
Example of Justify - aligns both right and left edges even.
Below are examples of how the rule appears for the text-aling property.
Example
p.date {text-align:right;}
p.main {text-align:justify;}
h2 {text-align:right;}
Text Decoration
The text-decoration property is used to set or remove decorations from text. It is also used for applying underlines, overrlines, strikethrough of text and also blink. The default text-decoration value is none which means there is no text decoration applied to the text.
The text -decoration property is sometimes used to remove underlines from links for design purposes:
Example
It can also be used to decorate text in one of four ways.
Example
h2 {text-decoration:line-through;}
h3 {text-decoration:underline;}
h4 {text-decoration:blink;}
This is overline
This is line-through
This is underline
This is blinking text
Most webmasters recommend that web developers not underline any text on a web page that is not a link. This often confused users.
Text Transformation
The text-transformation property exists purely to manipulate the case of text. It is used to capitalize or to make all characters uppercase or lowercase in a text selection.
It can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word.
The text-transformation values are: capitalize, uppercase, lowercase, or none.
Example
p.lowercase {text-transform:lowercase;}
p.capitalize {text-trnsform:capitalize;|
Text Indentation
Indenting text in CSS is done using the text-indent property. It identifies the first line of text in a paragraph and inserts the specified length before the first line of text.
The values for the text-intendent property are <length>, or <percentage>
The default value is 0
Example
Share this Webpage
This site proudly build with Site Build It!





