search engine optimization articles do it yourself seo hiring search engine experts html and search engine optimization web site analysis and submission service

HTML Help: Indent Paragraph First Line

Here's a question my wife keeps asking. How do you get the first line of a paragraph to indent, preferably to auto-indent?
To have the first line of a paragraph indent automatically you need to add a CSS rule to your style sheet. Here's the rule:
p {text-indent: 12px;}
That would be for an external style sheet. If you're not using external style sheets, add the following code to the HEAD section of each page:
<style type="text/css">
p {text-indent: 12px;}
</style>
With the first code example in an external style sheet, or the second code example in the HEAD section of the page, each time you use a paragraph tag the first line will be indented by 12 pixels. Just change the "12" to the number you want and it's good to go.

You can also use inline CSS to indent a paragraph on a one-time basis. Here's an example:

<p style="text-indent: 15px;">

If this sentence is indented by 15 pixels, it worked! The second line and the lines thereafter would not be indented. Now go tell your wife you'll teach her how to indent paragraphs if she'll give you a big ol' kiss. ;)

This concludes the

HTML Help about Indenting the First Line of a Paragraph

.
Back | HTML FAQ | HTML Tag Chart | HTML Index | Web Design Tutorials
search engine optimization course
If you want your web site to rank high in the search engines . . . what are you going to do to get it there? Check out my search engine optmization guide, SEO for YOU: Search Engine Optimization for Ordinary Everyday People!

Check out SEO for YOU now!

Almost a Newsletter

Subscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:
Email:

First Name:

Privacy Policy

Did you know...

The member's site has about 100 standards compliant HTML and CSS tutorials, 31 handy reference charts, reprintable content, web graphics, exclusive fonts, free software, free ebooks and more? All this for less than 9 cents a day! [ Details ]
See my fancy bottom! :)