Htmltemplate implementation