tag and attribute generator