diff --git a/CSS-Selector-help.md b/CSS-Selector-help.md index e0e1e8f..7cd97b1 100644 --- a/CSS-Selector-help.md +++ b/CSS-Selector-help.md @@ -45,6 +45,12 @@ filter: `//h3/parent::a//@href` //img//@src ``` +# Select just the first instance of something +``` +xpath:(//h3[contains(@class, 'PagePromo-title')])[1] +``` +This selects just the first instance of an h3 that contains the class PagePromo-title + # Select by `data-` source ```