Suggest an editImprove this articleRefine the answer for “What is the priority of the ID selector?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**The ID selector** has very high priority: it ranks above class and tag selectors, but below inline styles and `!important` (in the specificity formula, this is 1 point in digit `b`). **Key point:** the ID selector almost always wins over a class or tag when they conflict.Shown above the full answer for quick recall.Answer (EN)ImageThe `ID` selector has **very high priority**, it ranks **above class and tag selectors**, but below inline styles and `!important`. If expressed through the specificity formula `[a, b, c, d]`, ID gives **1 point in digit** `b`, that is: ```javascript #header → [0, 1, 0, 0] .class → [0, 0, 1, 0] div → [0, 0, 0, 1] ``` --- ### Summary of selector priority (top to bottom) 1. `!important` 2. **inline styles (**`style=""`**)** 3. **ID selectors (**`#id`**)** 4. class, attribute, pseudo-class selectors 5. tag selectors 6. default browser styles --- Thus, **the ID selector has one of the highest priorities among regular CSS selectors** and almost always "wins" over a class or tag if they conflict.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.