Generate HTML DOM programmatically