public static Document createHtmlDocument(){
  Document document=createDocument();
  Element root=document.createElement("html");
  document.appendChild(root);
  Element head=document.createElement("head");
  root.appendChild(head);
  Element body=document.createElement("body");
  root.appendChild(body);
  return document;
}

public static Document createHtmlDocument ( ) { Document document = createDocument ( ) ; Element root = document . createElement ( "html" ) ; document . appendChild ( root ) ; Element head = document . createElement ( "head" ) ; root . appendChild ( head ) ; Element body = document . createElement ( "body" ) ; root . appendChild ( body ) ; return document ; }
returns a document with a html node containing a head and body node .
