|
![]() |
#1 |
Registered User
Join Date: Aug 2014
Location: India
Posts: 147
|
The Difference Between ID and Class
The Difference Between ID and Class
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
![]() |
![]() |
![]() |
#2 |
Registered User
Join Date: Aug 2014
Location: Surat
Posts: 847
|
ID, short for fragment identifier, is a beautiful attribute, but it's very easy to use them improperly.
Classes, like ID's, can also be used to in JavaScript scripts, but unlike ID's, they can be used multiple times in the same HTML document. This separation of content from presentation is what makes sites powered by CSS more robust, but some don't know the full extent to which they can use classes. Classes can not only be used more than once, but more than one can be used on an element:
__________________
I am SEO expert and handling SEO for following words To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. , To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. , To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. , To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
![]() |
![]() |
![]() |
#3 |
Registered User
Join Date: Dec 2013
Posts: 327
|
ID's are unique, Classes are NOT unique
Each element can have only one ID, the same class on multiple elements. Each page can have only one element with that ID, multiple classes can be used on the same element. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
The Difference Between ID and Class | doccs us | Graphic Design | 13 | 03-28-2017 07:59 AM |
Have you ever wondered what is inside a java class file? | cianfie | Java | 6 | 01-28-2015 11:09 PM |