|
|
Tutorials » Css »
|
Topic |
How to make a large blank space in html using css?
How to create the space / indent for the paragraph beginning?
|
|
Explanation |
Property: Text Indent
Usage:
text-indent: 1cm;
text-indent: 10px;
text-indent: 10pt;
text-indent: 10%;
Definition:
This attribute can be used to indent the text.
In simple word to move the text by some distance away from the border.
It can also be termed as a big marginal space
It takes the following values.
a)cm : The indent can be set in centimeter as 1cm or 2cm etc ...
b)px : The indent can be set in pixels as 1px or 10px etc ...
c)pt : The indent can be set in points as 1pt or 10pt etc ...
d)% : The indent can be set in percent as 10% or 5% etc ...
Example 1:
<div style=" text-indent: 1cm;">testing text indent</div>
Result:
testing text indent
Example 2:
<div style=" text-indent: 20px;">
testing text indent line 1<br>
testing text indent line 2
</div>
Result:
testing text indent line 1
testing text indent line 2
Example 3:
<div style=" text-indent: 40pt;">testing text indent</div>
Result:
testing text indent
|
|
A Note |
CSS - Cascading Style Sheets can be used along with html tags as explained in this site.
This simple CSS will help you to create much elegant and neat html web pages.
This does not need any additional softwares or codings.
All web browser are capable of handing CSS codes.
Note 2: If required you can using <span> instead of <div> tags.
div tag will start and end on new lines. span will not exceed the tag area.
|
|
|
|