Obesity has a multifactorial origin. Among the behavioural risk factors, excessive consumption of unhealthy foods, skipping breakfast and reduced physical activity stand out. The main objective of this article was to identify trends in dietary habits and their association with overweight/obesity over a 12‐year period in schoolchildren aged 7 to 10 years in Florianópolis, southern Brazil. A cross‐sectional panel analysis study, using anthropometric, sociodemographic, physical activity and food consumption data of schoolchildren aged 7 to 10 years, collected in three waves of the Study of Prevalence of Obesity in Children and Adolescents (EPOCA), carried out during the years 2007, 2012/2013 and 2018/2019, was performed. To analyse the trend in dietary variables over the years, the 95% CIs were compared with the non‐overlap of intervals indicating statistical significance. Multiple logistic regression analysis was performed to test the association of weight status with dietary markers. The prevalence of overweight/obesity was 34.4%, 37.2% and 34.2% in 2007, 2012/2013 and 2018/2019, respectively, and there were no statistically significant differences among waves. There was a progressive and significant reduction in the consumption of soft drinks and sweets and in eating breakfast by schoolchildren, from 2007 to 2019. Breakfast consumption was inversely associated with the chance of overweight/obesity (OR 0.74, 95% CI 0.59–0.93), and female students were less likely to have overweight/obesity when compared to boys (OR 0.70, 95% CI 0.61–0.81). The reduction in the consumption of soft drinks and sweets over the years might be caused by efforts in public policies that intended to reduce the consumption of unhealthy foods among schoolchildren. The progressive and significant reduction in having breakfast should be better elucidated in future studies, to minimise the potential impact of this practice on schoolchildren's bodyweight.