protected String getAttributeString() {
        String attributeString = "";

        for (String name : this.attributes.keySet())
            attributeString += name + "=\"" + this.attributes.get(name) + "\" ";

        attributeString = attributeString.trim();

        if (this.classes.size() > 0)
            attributeString += " class=\"";

        for (String className : this.classes)
            attributeString += className + " ";

        attributeString = attributeString.trim();

        if (this.classes.size() > 0)
            attributeString += "\"";

        if (this.styles.size() > 0)
            attributeString += " style=\"";

        for (String styleName : this.styles.keySet())
            attributeString += styleName + ": " + this.styles.get(styleName) + "; ";

        attributeString = attributeString.trim();

        if (this.styles.size() > 0)
            attributeString += "\"";

        return attributeString;
    }