Class can affect several elements.
ID is typically used for a single element, though you can use it on several elements.
Id:
Code:
#id1 {
text-align:center;
color:blue;
}
Class:
Code:
.colorcode {
color: red;
}
Classes begin with '.'
ID's begin with '#'
Hope this helps.
Here's a helpful link:
http://w3schools.com/css/css_id_class.asp
__________________
Validate, early and often. | Use W3Schools! |
Search for your answer before posting.
For the love of everything electronic, VALIDATE
Zdravstyvutye. Zdarova Chuvok?
Last edited by L0adOpt1c; 01-23-2013 at 02:01 PM..
Reason: Added link
|