Updated header and footer generation on tags