Thursday, 4 July 2013

SOME USE FULL TEXT PROPERTIES USING CSS

SOME USEFUL CSS PROPERTIES

SOME USE FULL TEXT PROPERTIES

The CSS text properties allow specifying the formatting rules for the textual content on a web page. You can change the direction of the text, can specify the spacing between the letters or can handle the white spaces. 

  1. direction: specifies the direction of the text. It will specify weather the text will right from left to right, right to left. Possible values are : rtl, ltr.
  2. letter-spacing: It will increment or decrement the space between characters. The possible value is either normal or the length type.
  3. white-space: Handles the white spaces. Possible values are normal, pre and nowrap. The nowrap will display the text on the same line until you will not use the blank row tag.
Here is the code mentioned below:

<style type= "text/css">

Heading No1


Heading No2

You can see the diffrence between the two heading and the paragarpah too. Heading one is using the direction from left to right and the heading two is using the direction from right to left. Similarly the heading one is using the 1px between the words and the heading two using the pixel 2 between the two letters. Similarly the paragraph element is using the letter spacing 4 and the white spaceas as mentioned pre.

H1
{
 direction:rtl;
 letter-spacing:15px;
}
H2
{
 direction:ltr;
 letter-spacing:8px;
}


p
{
 letter-spacing: 4px;
 white-space:pre;

}
</style>

No comments:

Post a Comment