<input type="submit" value="Go" usestyle>

DJ Mike's Tutorials: Styling Paragraphs

Some people like to have their web pages to have paragraphs indented the way they do with printed media. With WebTV, you can use Alt-Space,   or transparent .gifs to indent each paragraph but with CSS, there is a better way: use text-indent.

With in the <span>, put p {text-indent: 2em;} and all of your paragraphs will be automaticly indented. If you decide to change the indentation later, all you have to do is change that one number and the indentation will change for all of your paragraphs at once.

Don't forget! If you are using CSS, you need to close your paragraphs with </p>

If you have special paragraphs, you can style them separately. For example, to make example, question and answer paragraphs:

<p class="example">
<style>
p {text-indent: 2em;}
p.example {margin: 2em; text-indent: 0px; color: black; background-color: white}
p.q {text-indent: 0px; color: red}
p.a {text-indent: 0px; font-style: italic; color: blue}
</style>
</p>



<p class="q">
Q: How do you indent paragraphs?
</p>

<p class="a">
A: Use text-indent
</p>

Created by DJ Mike from Santa Barbara

DJ Mike


Dance Away Santa Barbara's Home Page
<a href="http://www.statcounter.com/" target="_blank"> <img src="http://c5.statcounter.com/counter.php?sc_project=1321035&java=0&security=da2193dc" alt="counter free hit invisible" border="0" /></a>