code: public static Element createElement(String html) throws Exception {
  
          Element wrapperDiv = DOM.createDiv();
          wrapperDiv.setInnerHTML(html);
          Element elementRoot = wrapperDiv.getFirstChildElement();
          wrapperDiv.removeChild(elementRoot);
          // just in case we have a script tag outside the root HTML-tag
          while ((elementRoot != null) && (elementRoot.getTagName().toLowerCase().equals(Tag.script.name()))) {
              elementRoot = wrapperDiv.getFirstChildElement();
              wrapperDiv.removeChild(elementRoot);
          }
          if (elementRoot == null) {
              CmsDebugLog.getInstance().printLine(
                  "Could not create element as the given HTML has no appropriate root element");
              throw new IllegalArgumentException(
                  "Could not create element as the given HTML has no appropriate root element");
          }
          return elementRoot;
      }
docs: This method will create an {@link com.google.gwt.dom.client.Element} for the given HTML.
  The HTML should have a single root tag, if not, the first tag will be used and all others discarded.<p>
  Script-tags will be removed.<p>
  
  @param html the HTML to use for the element
  
  @return the created element
  
  @throws Exception if something goes wrong