<script type="text/javascript">
document.getElementById("div1").style.textIndent="50px";
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.
<input type="button" onclick="setTextIndent()" value="Indent first line of text" />