ENع
الدرس 03 · Styling basics

The cascade and specificity

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

When several rules set the same property on the same element, the browser must pick one. Watch four rules fight over one paragraph's colour: every selector matches, each gets a specificity score (IDs, classes, tag names), equal scores are settled by which rule comes later, and a higher score wins wherever it is written. Then delete the id and see a different rule win.

10 دقيقة8 خطوات5 أسئلةBeginner
شكل 3 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.