Issue #2256373 by Crell, joelpittet: Factor HtmlFragment out to an interface.