We find a strong correlation between the extension of the Na-O anticorrelation observed in red giant branch (RGB) stars and the high temperature extension of the horizontal branch (HB) blue tails of Galactic globular clusters (GCs). The longer is the O-depleted tail of the Na-O anticorrelation observed in the RGB stars, the higher is the maximum temperature reached by the bluest HB stars in the GC. This result provides a clear, empirical evidence of a link between the extension of the HB and the presence of star-to-star abundance variations of proton-capture elements in GC stars. We discuss the possible interpretation of this correlation.