Improve encapsulation for HtmlTag.

Improved Contents builder.