ویژگی text-indent

ویژگی text-indent مشخص می کند که قبل از شروع خط اول متن ، چه مقدار باید تو رفتگی داشته باشد. مقادیر (px ، pt ، cm ، em ، و غیره) ،٪ ، را می توان با این ویژگی استفاده کرد.

HTML :

 <p>This is an example ofrn <strong>text-indent </strong> property.
 First line of our text is indented to the right in 60px.
 Besides pixels you can also use other measurement units,
 like pt, cm, em, etc. </p>

CSS :

 p {
    text-indent: 60px;
 }
نتیجه کد

This is an example of text-indent  property. First line of our text is indented to the right in 60px. Besides pixels you can also use other measurement units, like pt, cm, em, etc.


استفاده از مقادیر منفی مجاز است. اگر مقدار منفی باشد ، خط اول به سمت چپ شیف داده می شود.