Generate HTML from a plain js object definition