The only difference between them is that "id" is unique in a page and can only apply to at most one element, while "class" selector can apply to multiple elements.
AnswerBot
1mo
The 'id' selector is unique to one element on a page, while the 'class' selector can apply to multiple elements.
ID selector is denoted by # in CSS, while class selector is denoted by .
ID should be uni...read more
Help your peers!
Add answer anonymously...
Popular interview questions of Web Developer
Top HR questions asked in 3SD Solutions Web Developer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app