shadowline
Div & Span << Tag Style >> ID & Class
CSS tags are also known as elements or selectors. They have a basic layout very similar to regular HTML tags.

Regular HTML tag <tag property="value">
CSS command tag element {property: value;}

One of the main differences is the use of the { } brackets instead of the < > brackets.

The ELEMENT can be a normal HTML tag, an id, or a class.

The PROPERTY and VALUE are the same form as the HTML tags.


Tag Elements

Tag elements are very similar to regular HTML tags. Here is an example showing some regular text being formatted in a red color :

HTML <font color="#ff0000">
<p>
Red Text
</p>
</font>

Red Text

HTML4 n CSS <p style="color: #ff0000;">
More Red Text
</p>

More Red Text


The outcome is the same. The above example shows how to use the inline style CSS, where the command is actually part of a normal HTML tag. That will help on individual instances, but when you want ALL the text within all <p> area to be red, you can use the embedded style CSS. This places the CSS command into the HEAD area of the code.

HEAD area <style type="text/css">
<!-- p {color: #ff0000;} -->
</style>
BODY area <p> Yet again </p>
Not here
<p> and again </p>
Yet again
Not here
and again

All of the text within the <p> tags on that page will be affected by the CSS command, making them red. Any text outside of a <p> area will not be affected.
Div & Span << Tag Style >> ID & Class
shadow

Advertise in the banner along the top, Click here!

Valid XHTML 1.0 Transitional Valid CSS! Text Link Ads
shadow
shadow