Diet is a potential determinant of allergic diseases. To examine in schoolchildren the association between food intake and allergic diseases and determine whether there is effect of environment - rural vs. urban. A questionnaire survey was performed in 11 473 children aged 7-12 years in 20 schools from urban Guangzhou and rural Shaoguan, China. A nested case-control group, 402 from Guangzhou and 349 from Shaoguan, was recruited. Food ingestion frequency data were collected. Serum-specific IgE to 34 food and airborne allergens was determined. Associations between food ingestion frequency and clinical outcomes were sought by logistic analyses. The prevalence of self-reported asthma (6.6% vs. 2.5%), rhinitis (23.2% vs. 5.3%) and eczema (34.1% vs. 25.9%) was significantly higher in Guangzhou subjects compared to Shaoguan, whereas prevalence of food hypersensitivity (9.7% vs. 9.2%) and food allergy (4.0% vs. 3.5%) was not significantly different. In this case-control study, seafood and fruits were two major food groups causing food hypersensitivity. Urban children consumed more milk, egg, chocolate, fruits, vegetable and cereals compared to rural children. Significantly higher percentage of Guangzhou children was sensitized to egg and milk, whereas more Shaoguan children were sensitized to seafood, nuts and seeds, fruit, vegetables, legumes and cereals. High consumption of milk (OR 2.604, 95 CI% 1.569-4.322, P < 0.001) and vegetables (OR 0.382, 95% CI 0.180-0.809, P = 0.012) were positively and reversely associated with asthma, respectively. Difference in prevalence of asthma but not food allergy was observed. Diets of schoolchildren are affected by disease-related modification and country's urbanization. High vegetable intake and low milk intake might protect against asthma.