Diffrerence between id and class
I don't understand the differences of those ,are they the same ? And why?
Id and class attributes can both be used to reference an element, but there's a slight root difference between them: - id provide an html element identifier, supposedly been unique ( unique id for unique element ) - class provide an css style identifier, can be used on many html element class attribute ( and each class attribute can define many class names separated by a white space to be applied to an html element )
id is unique, whereas class can be used for different tags.