CSS: The Basics - ID's and Classes

Csssomething like this
Cascading Style SheetsYou can also insert an id within another one like
Two types of style sheets: Internal and Externalthis
Internal - You insert your style code right intoRemember to close the id's in order.
your html code.Now, onto css classes.
These stylesheets should only be used if you areCreating Classes
intending tocreate a specific page with a specificTo create a class in your css, use this
style. If you want to beable to make global.subtitle {color: #000000;
changes to your website using only one}
stylesheet, you have to use....To insert the class into your html, do this
External Stylesheets - Instead of putting all theNow, you can use the same class repeatedly in
style code intoyour html code, you can create athe same pageunlike Id's.
single document with your csscode and link to itI also want to tell you something about link
within your webpages code. It wouldattributes. Youshould always keep them in this
looksomething like thisorder:a {color: #006699;text-decoration:
Webpage title< itle>href="none;font-size: 100%;
If you decide to use an internal stylesheet, you}a:link {color: #006699;text-decoration: none;
have to put yourcss style wihin the following tags:}a:visited {color: #006699;text-decoration: none;
All css or links to the external stylesheets have}a:hover {color: #0000FF;text-decoration:
to go inbetween the tagsunderline;
Now about Css Classes vs. ID's}a:active {color: #FF0000
The one major difference between a class and an}
id is thatclasses can be used multiple times withinOf course, you can change the colors and
the same page while antext-decorations. Thisis just something I cut out
Id can only be used once per page.of my code!
Example:Okay, these are the basics. What I highly
ID - The global navigation of your site, or arecommend is to go anddownload Topstyle Lite
navigation bar. Afooter, header, etc. Only itemsby going here: opstyle slite/index.asp
that appear in only one placeper page.It's free and is a very helpful css editor. It not
Class - Anything that you would use multiple timesonly colorcodes and organizes your code, but it
in your page,such as titles, subtitles, headlines, andprovides you with tons ofattributes that you can
the like.add to your class and id elements withjust a click.
Creating ID 'sThey also provide a screen at the bottom to
To create an Id in your css, you would start withview yourcss code as you create it. Very useful
the number signfor a free edition and
(#) and then your label of the id. Here's anI'm looking to buy the pro version soon.
exampleNow, this was just a very very brief explanation
#navigation {float:left;of the vitalelements needed when structuring
}your css.
To insert the id in your html, you would do