use the new html_writer api for span and div

See issue #102 for discussion