text-indent

  • Revision slug: CSS/text-indent
  • Revision title: text-indent
  • Revision id: 37543
  • Created:
  • Creator: BijuGC
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}

Summary

The text indent CSS property specifies how much horizontal space should be left before beginning of the first line of the text content of an element. Horizontal spacing is with respect to the left (or right, for right-to-left layout) edge of the containing block element's box.

  • {{ Xref_cssinitial() }}: 0px
  • Applies to: block elements, table cells and inline blocks
  • {{ Xref_cssinherited() }}: yes
  • Percentages: refer to width of containing block
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: the percentage as specified or the absolute length

Syntax

text-indent :	<length> | <percentage> | inherit;


Values

{{ Xref_csslength() }}  
indentation is specified as fixed length with unit.
{{ Xref_csspercentage() }}  
indentation is a percentage of the containing block width.
{{ Cssxref("inherit") }}  

Examples

{{ CSSRefExampleLink("text-indent") }} {{ Fixeg() }}

p {
  text-indent : 50px;
}

Notes

Specifications

Browser compatibility

{{ Fixbrowser() }}

Browser Lowest Version
Internet Explorer ?
Firefox ?
Netscape ?
Opera ?
Safari ?


See also

{{ CSS_Reference:Text() }}

uncomment as required {{ mediawiki.internal('Category:NeedsContent', "en") }} {{ mediawiki.internal('Category:NeedsAttention', "en") }} {{ mediawiki.internal('Category:NeedsExample', "en") }} {{ mediawiki.internal('Category:NeedsImageCleanup', "en") }} {{ mediawiki.internal('Category:NeedsMarkupWork', "en") }} {{ mediawiki.internal('Category:NeedsRewrite', "en") }} {{ mediawiki.internal('Category:NeedsTechnicalReview', "en") }} {{ mediawiki.internal('Category:NeedsEditorialReview', "en") }} {{ mediawiki.internal('Category:NeedsUpdate', "en") }}

Revision Source

<p> {{ CSSRef() }}
</p>
<h3 name="Summary"> Summary </h3>
<p>The text indent CSS property specifies how much horizontal space should be left before beginning of the first line of the text content of an element. Horizontal spacing is with respect to the left (or right, for right-to-left layout) edge of the containing block element's box. </p>
<ul><li> {{ Xref_cssinitial() }}: 0px
</li><li> Applies to: block elements, table cells and inline blocks </li><li> {{ Xref_cssinherited() }}: yes </li><li> Percentages: refer to width of containing block </li><li> Media: {{ Xref_cssvisual() }} </li><li> {{ Xref_csscomputed() }}: the percentage as specified or the absolute length </li></ul>
<h3 name="Syntax"> Syntax </h3>
<pre class="eval">text-indent :	&lt;length&gt; | &lt;percentage&gt; | inherit;
</pre>
<p><br>
</p>
<h3 name="Values"> Values </h3>
<dl><dt>{{ Xref_csslength() }}  </dt><dd> indentation is specified as fixed length with unit.
</dd><dt>{{ Xref_csspercentage() }}  </dt><dd> indentation is a percentage of the containing block width.
</dd><dt>{{ Cssxref("inherit") }}  </dt><dd> </dd></dl>
<h3 name="Examples"> Examples </h3>
<p>{{ CSSRefExampleLink("text-indent") }} {{ Fixeg() }}
</p>
<pre class="eval">p {
  text-indent : 50px;
}
</pre>
<h3 name="Notes"> Notes </h3>
<h3 name="Specifications"> Specifications </h3>
<ul><li> <a class="external" href="http://www.w3.org/TR/CSS1#text-indent">W3C Cascading Style Sheets, level 2 revision 1</a> </li><li> <a class="external" href="http://www.w3.org/TR/CSS1#text-indent">W3C Cascading Style Sheets, level 1</a> (secondary)
</li><li> <a class="external" href="http://www.w3.org/TR/css3-text/#text-indent">W3C Cascading Style Sheets, level 3</a>
</li></ul>
<h3 name="Browser_compatibility"> Browser compatibility </h3>
<p>{{ Fixbrowser() }}
</p>
<table class="standard-table"> <tbody><tr> <th>Browser</th> <th>Lowest Version</th> </tr> <tr> <td>Internet Explorer</td> <td>?</td> </tr> <tr> <td>Firefox</td> <td>?</td> </tr> <tr> <td>Netscape</td> <td>?</td> </tr> <tr> <td>Opera</td> <td>?</td> </tr> <tr> <td>Safari</td> <td>?</td> </tr>
</tbody></table>
<p><br>
</p>
<h3 name="See_also"> See also </h3>
<p>{{ CSS_Reference:Text() }}
</p><p><span class="comment">uncomment as required {{ mediawiki.internal('Category:NeedsContent', "en") }} {{ mediawiki.internal('Category:NeedsAttention', "en") }} {{ mediawiki.internal('Category:NeedsExample', "en") }} {{ mediawiki.internal('Category:NeedsImageCleanup', "en") }} {{ mediawiki.internal('Category:NeedsMarkupWork', "en") }} {{ mediawiki.internal('Category:NeedsRewrite', "en") }} {{ mediawiki.internal('Category:NeedsTechnicalReview', "en") }} {{ mediawiki.internal('Category:NeedsEditorialReview', "en") }} {{ mediawiki.internal('Category:NeedsUpdate', "en") }}</span>
</p>
Revert to this revision