Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

HTML Class vs Id

Tags: None
Ads
banner
antony Offline referral

Posts: 478
Joined: Jul 2013
Reputation: 5

#1
Senior Member
Could you explain how to use CLASS and ID tag in HTML?
invisibe_dude Offline referral

Posts: 825
Joined: May 2013
Reputation: 24

#2
Posting Freak
ID tag is used to specify a style for a single, unique element.
CLASS tag is used to specify a style for a group of elements.
chod Offline referral

Posts: 860
Joined: Jul 2013
Reputation: 85

#3
Posting Freak
ID is unique, Class is not unique.
ID will have extra browser abilities, Class will not
Elements can have both
Make sure you understand why to use one over the other.

There is a TON more about the differences here and you're best bet is to actually research more on you own and ask more indepth questions then.
www.AdminEmpire.com
www.BlimptonTech.com - Best Free Online JavaScript tool to minify JavaScript files.
maya Offline referral

Posts: 1,058
Joined: May 2013
Reputation: 34

#4
Posting Freak
Here is the CSS difference between div id VS. div class

This is the HTML code

Code:
<div class="CSS-CLASS"> and <div id="CSS-ID">

This is the CSS code

Code:
.CSS-CLASS { color: blue }
#CSS-ID { color: red }
damponting44 Offline referral

Posts: 537
Joined: Oct 2016
Reputation: 0

#5
Senior Member
Dissimilar to the id al-adha selector, the class selector will be The majority regularly utilized ahead a few components. This permits you with situated An specific style to a significant number html components with the same class. Those class selector utilization the html population attribute, What's more may be characterized for a ". " id al-adha is utilized At we must apply CSS property to person quality just.
sankalppatil Offline referral

Posts: 112
Joined: Jan 2018
Reputation: 0

#6
Member
The id tag in html are unique and the class tag in html are not unique.
Id tag-each element can have only one id,
Class tag-use the same class on the multiple element.





User(s) browsing this thread: 1 Guest(s)