HTML CSS Reference/CSS Attributes and Javascript Style Properties/text indent

Материал из Web эксперт
Перейти к: навигация, поиск

"text-indent" Example

    
<html>
<body>
<div style="width:200; background-color:beige; text-indent:50px">
This is a sample paragraph with an indent of 50px. 
</div>
</body>
</html>



"text-indent" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<blockquote>                    <body>                        |
|                |<button>                        <center>                      |
|                |currentStyle                    <dd>                          |
|                |<dfn>                           <dir>                         |
|                |<div>                           <dl>                          |
|                |<dt>                            <fieldset>                    |
|                |<form>                          <hn>                          |
|                |<hr>                            <isindex>                     |
|                |<li>                            <listing>                     |
|                |<marquee>                       <menu>                        |
|                |<ol>                            <p>                           |
|                |<pre>                           runtimeStyle                  |
|                |style                           <table>                       |
|                |<td>                            <th>                          |
|                |<tr>                            <ul>                          |
|                |<xmp>                                                         |
+----------------+--------------------------------------------------------------+



"text-indent" Possible Values

Possible Values
length           A floating-point number followed by a unit designator
percentage       Percent width of the parent element



"text-indent" Syntax and Note

Note:
Controls the first-line text indentation.
Syntax:
    
element { text-indent: value }
elementID.style.textIndent = "value"
document.all.elementID.style.textIndent = "value" // IE only