has_class(HTMLObject, Class) is true if and only if HTMLElement contains Class in its class attribute. If Class is not instantiated, has_class/3 will unify with all the classes contained in the class attribute.