Learn HTML Code Tutorial Reference Guide

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




 

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   Privacy Policy   |   About
Copyright ©1997-2002 Idocs and ©2002-2014 HTML Code Tutorial