protected function formatAttributes()
    {
        $this->attributes['class'] = implode(' ', $this->classes);

        $html = '';

        foreach ($this->attributes as $name => $value) {
            $html[] = "$name=\"$value\"";
        }

        return implode(' ', $html);
    }