Element.getParent

T getParent(T = Element)(string tagName = null) if(is(T : Element))

Gets the nearest node, going up the chain, with the given tagName May return null or throw. The type T will specify a subclass like [Form], [Table], or [Link], which it will cast for you when found.