Move out some ToHtml impl from Node to Element