javascript textIndentProperty


  Translation results:

text

English[tekst] American[tɛkst]

n. Text, original text; text, textbook; theme; version

v .Texting

Third person singular: texts Plural: texts Present participle: texting Past tense: texted

indent

英[ɪnˈdent] 美[ ɪnˈdent]

vt. Cut...to make a jagged shape; indent typesetting

n. (in printing) indent; order, order

Third person singular: indents Present participle: indenting Past tense: indented Past participle: indented

javascript textIndentPropertysyntax

Function: Indent the first line of text in the element.

Syntax: Object.style.textIndent=length|%

javascript textIndentPropertyexample

<html>
<head>
<script type="text/javascript">
function setTextIndent()
{
document.getElementById("div1").style.textIndent="50px";
}
</script>
</head>
<body>

<div id="div1">
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
</div>
<br />
<input type="button" onclick="setTextIndent()"
value="Indent first line of text" />

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance

Home

Videos

Q&A