If we have a htmlanchor element.

Is there an elegant way to know whether the link is no follow or do follow after taking into account that tag and context of the links.