Split html into templates and sections