Q:

Create HTML document

I want to create a HTML document in Java code, how can I do that effectively with Java SE 1.7, without relying on third party libs? 
Goal would be to not have to manually append html strings together and get some help with keeping the html valid.  

A:

html is just XML, so using a DocumentBuilderFactory to create an XML DOM Document, then populating it with your HTML elements, and finally writing it out to a Stream or disk file is a logical way to do this. 
Or use the built in XSLT transformation functionality to apply a XSLT sheet to an existing XML DOM object or file to turn that into HTML. 
Which would be preferable depends on your exact requirements.  Second is a bit more work to set up initially but a lot more flexible and reusable.