html_fragment function

Convert to an HTML fragment.