Specificity in CSS

Specificity in CSS is used to determine which css rule wins when we have multiple css rules applied to same element. e.g. If we have span element with class "tip" and we have 2 css rules that target this span element, then an algorithm is used to determine which rule wins.



In above example, .tip(class) rule will win as it has more specificity than span(element) rule.

Web development and Automation testing

solutions delivered!!