This question struck me when i was watching a liquid rise in a capillary tube. I'm curious to know from where the energy gets transferred to the liquid to rise above the surface. Well, one possible explanation that i can think of is air pressure. Though, it can be a possible reason only if the other end is closed (i don't remember if it was open or closed). So am i on the right track?