Css selector rank


Hello! Where can I find the specificity calculator? Thanks!

According to this exercise, `.main p` is more specific than the `p` selector. Is `.main p` also more specific than the `p.main` or `#main` selectors?

i found it on google, well at least one:


but ideally you would understand the point system:

If the element has inline styling, that automatically1 wins (1,0,0,0 points)
For each ID value, apply 0,1,0,0 points
For each class value (or pseudo-class or attribute selector), apply 0,0,1,0 points
For each element reference, apply 0,0,0,1 point

as explained here: