Classes in Style Sheets

Using Style Sheets, a single tag can have multiple properties. For example, the <P> tag. By itself, it just gives you two line breaks. Using the follow line in a style sheet, you can have <P> indent a paragraph:

P { text-indent: 2em }

Anything inside <P>these tags</P> will be indented.

What if you don't want to indent all of your paragraphs?
You can make a class of <P> that won't. You can also have it indent different amounts. The following line illistrates this:

P.DoNotIndentMe { text-indent: 0em }
To use it you can include class="DoNotIndentMe" in your <P> tag.


Here's the code in full HTML:

Here are the results:

Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented Lots of Text Indented

Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented! Lots of text, but not indented!

You can also use this with other tags.



This is a simple javascript that does the same job as you browser's Back and Forward arrows.


Here's the code:

Here are the results:
Back Forward