Extract HTML to page template