ankur218 Posted July 16, 2012 Share Posted July 16, 2012 Hello everyone, I am new to CSS. I was going through many references but none of them made me understand the difference between id and class. I saw many css files but couldn't figure when they are used and when they must be avoided. Could you please explain me in detail? Cheers Link to comment Share on other sites More sharing options...
birbal Posted July 16, 2012 Share Posted July 16, 2012 (edited) when your element will share same characteristic you will use class. when your element have unique characteristic you will use id. many elements can have same class in one page but there can't be two same id. id is unique/ most of the time you will need to use class. Edited July 16, 2012 by birbal Link to comment Share on other sites More sharing options...
scout1idf Posted July 16, 2012 Share Posted July 16, 2012 http://w3schools.com...ss_id_class.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now