Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

css difference between class and id

/* 
Syntax: Id uses # while Class uses .
Selector: Only one Id can be attached to an element while multiple classes can be attached to an element.
Uniqueness: Id is unique in a page and can only apply to at most one element while class can be applied to multiple elements so it could be multiple times on a single page.
*/
 
PREVIOUS NEXT
Tagged: #css #difference #class #id
ADD COMMENT
Topic
Name
7+1 =