Indenting a Paragraph

You can indent a single paragraph using styles. For example, suppose we want to indent a paragraph 50 points. First we create a class called indented with the following style rules. Put this code in the <HEAD> section of your document.

<STYLE TYPE="text/css">
<!--
.indented
{
padding-left: 50pt;
padding-right: 50pt;
}
-->
</STYLE>

Now we set the class of the paragraph to indented by adding a CLASS attribute to the <P ...> tag:

<P CLASS="indented">
The paragraph

Which gives us an indented paragraph:

You don't know about me without you have read a book by the name of The Adventures of Tom Sawyer; but that ain't no matter. That book was made by Mr. Mark Twain, and he told the truth, mainly. There was things which he stretched, but mainly he told the truth. That is nothing. I never seen anybody but lied one time or another, without it was Aunt Polly, or the widow, or maybe Mary. Aunt Polly -- Tom's Aunt Polly, she is -- and Mary, and the Widow Douglas is all told about in that book, which is mostly a true book, with some stretchers, as I said before. - Opening to Huck Finn





About the Author
Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.