cohesion
Some liquids, such as mercury, display more attraction between the liquid particles than attraction between the liquid and the glass. This is known as cohesion . The pull between the liquid particles is stronger, so the liquid pulls away from the glass.