in css what is the different between id & class. can i use the same id css selector in multiply places. for example, if i have a #box1, can i apply this do multiple layer? will it make validation error?
An id can only be used once per page, and is used to specifically identify one particular element on the page. If you want to apply the same styles to multiple elements then you would use a class name. Elements can have an id and a class if you want.