Water is a polar molecule and thus when a glass tube or any other tube with polar molecules is placed in water, the water molecules will attract the sides of the tube and overcome gravity. The property of water to attract the sides of the tube is called adhesion and the reason water isn't only on the sides but in the middle too is because of cohesion. Cohesion is water's ability to attract and hydrogen bond with itself so the water molecules on the sides of the tube attract other water molecules creating a network that reaches all the way across the tube.
Gravity and capillary action.
Capillary action is also essential for the drainage of constantly produced tear fluid from the eye. Paper towels absorb liquid through capillary action. Chemists utilize capillary action in thin layer chromatography, in which a solvent moves vertically up a plate via capillary action. Dissolved solutes travel with the solvent at various speeds depending on their polarity. With some pairs of materials, such as mercury and glass, the interatomic forces within the liquid exceed those between the solid and the liquid, so a convex meniscus forms and capillary action works in reverse.
This force is called capillary action.
The adhesive force of wetting liquids specially water is responsible for capillary action, the capillary action is not possible for Mercury.
Capillary action is bad if you want to keep two liquids separate. Capillary action is difficult to control in terms of flow rate.
The narrower the bore of the tube ,the greater is the capillary action. For example :A sponge retains water (on being dipped in water)is due to capillary action.
Capillary action will pull water up the stem to the flower and into the petals.
The adhesive intermolecular forces between the substance rising (the one experiencing capillary action) and the container (typically a capillary).
A paper towel absorbing liquid is an example of capillary action.
Water is transferred from the roots to the leaves through the stem by capillary action.
The capillary fringe
Adhesion