Reconstruct html document with attributes.