@Test public void is() {

    String h = "<p>Hello<p title=foo>there<p>world";
    Document doc = Jsoup.parse(h);
    Elements ps = doc.select("p");
    assertTrue(ps.is("[title=foo]"));
    assertFalse(ps.is("[title=bar]"));
}