Match class names when satisfying HTML paths