public function hasClass($className)
    {
        if(strlen($className) < 1)
        {
            throw new HTMLTagException("Class name is empty");
        }

        if($this->hasAttribute("class"))
        {
            $classes = $this->getClasses();

            foreach(explode(" ",$classes) as $class) {
                if(strtolower($class) == strtolower($className)) {
                    return true;    // We found it.
                }
            }

        }

        return false;
    }