The TempData output is plain text and putting a div around it will leave a formatted but empty div on the screen if there is no TempData.