code: @Override
      public String getTagHtml(Tag tag) {
  
          if (CmsStringUtil.isEmpty(tag.getTagName())) {
              return "";
          }
          StringBuffer result = new StringBuffer(32);
          result.append('<');
          // Tag name is the first "Attribute"...
          Iterator itAttributes = tag.getAttributesEx().iterator();
          while (itAttributes.hasNext()) {
              result.append(itAttributes.next().toString());
              // avoid trailing whitespaces like <H1 >
              // in 2nd run htmlparser 1.5 would turn the whitespace into an Attribute with null name
              if (itAttributes.hasNext()) {
                  result.append(' ');
              }
          }
          result.append('>');
          return result.toString();
      }
docs: Overridden to also return the attributes of the Tag.
  <p>
  
  @see org.opencms.util.CmsHtmlParser#getTagHtml(org.htmlparser.Tag)