to-html method