The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS required: div class or id ? Re: required: div class or id ?


So, heres what the difference between classes and IDs are.

IDs are used for elements that don’t repeat (ones that you only have one of) such as #footer
Classes are used for repeating things such as an LI element inside of a UL.

Your code wont validate if you have more than one of the same ID on the same page.

Hope that helps