ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is the difference between an ID selector and CLASS?

user-image
تم إضافة السؤال من قبل Feras Abualrub , Web Solutions Manager , Qistas for Information Technology
تاريخ النشر: 2015/04/22
mohamed saad
من قبل 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
من قبل 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">

 

 

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟