Separates HTML into templates.