+ 2

Difference between using "class" and "id"?

doesn't they perform same function?

11th Dec 2016, 10:44 AM
R.K
5 Answers
+ 2
class can be used for more than 1 tags id is unique for each tag in which it is defined.
11th Dec 2016, 10:47 AM
manish rawat
manish rawat - avatar
+ 1
they have same function
11th Dec 2016, 10:47 AM
manish rawat
manish rawat - avatar
+ 1
it will work perfectly fine but u will never do ao because there is only 1 head per page so use head instead of any other id or class
11th Dec 2016, 10:53 AM
manish rawat
manish rawat - avatar
0
what if I define id in <head>
11th Dec 2016, 10:51 AM
R.K