close a tag in a template