DEV Community

Md Shahab Uddin
Md Shahab Uddin

Posted on

CSS Rule order of precedence

sdgsdg
This is the order of precedence(Highest to lowest):

  1. Specific rules: When we target html by claa or id or tag. Order
    of precedence is ID>class>tag. IF specificity is the same, later takes the precedence.

  2. Inline styles

  3. Embedded styles: Styles defined inside the header of a page.

  4. External styles

  5. Browser Default

Top comments (0)