Add the HtmlFormat class

This time use oop to implement the HtmlFormat class.