Hello guys! morning and welcome to another episode of my tutorial on Cascading Style Sheets. In my last tutorial i talked about Css Fonts and am believing that right now you guys have full knowledge of it. In this tutorial i will be talking about Cascading Style Sheets Text and it's properties.
This section of my tutorial on CSS teaches you how to manipulate text using CSS properties. You can set the following text properties of an element:
- The color property is used to set the color of the text.
- The direction property is used to set the direction of the text.
- The letter-spacing property is used to add or subtract space between the letters that make up a word.
- The word-spacing property is used to add or subtract space between the words of a sentence.
- The text-indent property is used to indent the text of a paragraph.
- The text-align property is used to align the text of a document.
- The text-decoration property is used to underline, overline and strikethrough a text.
- The text-transform property is used for converting text to uppercase or the lowercase letters.
- The white-space property is used to control the flow and formatting of a text.
- The text-shadow property is used to set the text shadow around the text.
Set the Text Color
The following example below shows how to set the text color. Possible values could be any color name in any valid format.
RECOMMENDED: Css introduction
Set the Text Direction
The following example shows how to set the direction of a text in a Html document. Possible values are ltr or rtl.
Set the Space between Characters
The following example shows how to set space between characters. Possible values are normal or a number specifying space.
Set the Space between Words
The following example shows how to set space between words. Possible values are normal or a number specifying space.
RECOMMENDED: Introduction to Python Programming
Set the Text Indent
The following example shows how to indent the first line of a paragraph. Possible values are % or a number specifying the indent space.
Set the Text Alignment
The following example shows how to align a text. Possible values are left, right, center and justify.
Decorating the Text
The following example shows how to decorate a text. Possible values are none, underline, overline, line-through and blink.
RECOMMENDED POST: Html Backgrounds
Set the Text Cases
The following example shows how to set the case for a text. Possible values are none, capitalize, uppercase and lowercase.
Set the White Space between Text
The following example shows how to set a white space between texts. Possibles are normal, pre and no wrap.
Set the Text Shadow
The following below shows how to set the shadow around a text. Note that this may not be supported by all browsers.
Alright guys that's it for this tutorial on CSS, thanks for joining us on this tutorial. Feel free to drop your questions on the comment box below, they will be attented to as soon as possible, thanks and bye for now.