Element.getAttribute

string getAttribute(const(char)[] attr)

Get an attribute. It returns null if the attribute is missing.