split html into templates