add encoding and title to html template