Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the difference between an ID selector and CLASS?

user-image
Question added by Feras Abualrub , Web Solutions Manager , Qistas for Information Technology
Date Posted: 2015/04/22
mohamed saad
by mohamed saad , Senior WordPress developer , Innostead

id can be used for one element but class can be used for more than one element the class preceded by "." and id can be preceded by "#"

Ahmed Nawaz Butt
by Ahmed Nawaz Butt , PHP YII2 Web Developer , Offneo

ID should be placed only once in the page content while class can be used for multiple time as per required.

 

e.g <body id='HomePage'>

 

 

and <p class="RedPara">

 

 

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.