Diet has been hypothesized to play a role in the etiology of gastrointestinal cancer for a long time. Initially, strong evidence of such effects was found in retrospective epidemiological studies. Dietary habits, in particular those from the distant past, are difficult to measure, however. Results from recent, prospective and larger studies of better quality did not always confirm these associations. Consumption of fruits and vegetables appear to have a modest role in the prevention of gastrointestinal cancers. In contrast, the roles of alcohol consumption and overweight on risk of gastrointestinal cancer have become much clearer. Overweight and obesity are important risk factors for adenocarcinoma (but not squamous carcinoma) of the esophagus, gastric cardia carcinoma (but not noncardia carcinoma), and colorectal cancer, the latter in particular among men. Alcohol consumption is a risk factor for squamous carcinoma (but not adenocarcinoma) of the esophagus, gastric cancer and colorectal cancer. Selenium may be inversely related to esophageal and gastric cancer.