text-indent property
Specifies the horizontal indent for the first line of text.
JavaScript page for this property: textIndent. You can find other example(s) there. |
Possible values:
One of the following values:
The horizontal indent in length units. For the supported length units, see the length page. | |||||||
The indent is the specified percentage of the width of the parent object. | |||||||
Takes the value of this property from the computed style of the parent element. |
Default: 0.
Example HTML code 1:
This example illustrates the use of the text-indent property:
|
||||
<head> <style> .indent40 { text-indent: 40px; } .indent100 { text-indent: 100px; } </style> </head> <body> <div class="indent40"> This text is indented with 40px from left. It affects only the first line of this block. </div> <br /> <div class="indent100"> This text is indented with 100px from left. It affects only the first line of this block. </div> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
address, blockQuote, body, button, caption, center, dd, dir, div, dl, dt, fieldSet, form, H1, H2, H3, H4, H5, H6, html, input:button, input:reset, input:submit, isIndex, legend, li, listing, marquee, menu, ol, p, plainText, pre, table, td, textArea, th, tr, ul, xmp
Related pages:
color
font
font-family
font-size
font-size-adjust
font-style
font-variant
font-weight
text-align
text-align-last
text-autospace
text-decoration
text-justify
text-kashida-space
text-overflow
text-shadow
text-transform
text-underline-position
font
font-family
font-size
font-size-adjust
font-style
font-variant
font-weight
text-align
text-align-last
text-autospace
text-decoration
text-justify
text-kashida-space
text-overflow
text-shadow
text-transform
text-underline-position
External links:
text-indent (MSDN)
text-indent (Mozilla Developer Center)
text-indent (Safari Reference Library)
text-indent (W3C)
text-indent (Mozilla Developer Center)
text-indent (Safari Reference Library)
text-indent (W3C)
User Contributed Comments