MDN / Comparison of CSS Selectors and XPath
MDN / Comparison of CSS Selectors and XPath
This article seeks to document the difference between CSS Selectors and XPath for web developers to be able to better choose the right tool for the right job.
XPath featureCSS equivalentancestor, parent or preceding-sibling axisselectorattribute axisAttribute selectorschild axisChild combinatordescendant axisDescendant combinatorfollowing-sibling axisSubsequent-sibling combinator or Next-sibling combinatorself axisor selector