translate HTML to template