As , hydrogen has less density than air(As air is comprised of nitrogen 79% and oxygen 20% and little amount of some gases). Since most of air is made up of nitrogen and oxygen which have heavier molecular weight than hydrogen so the air pushes the hydrogen balloon up than that of gravity which is pulling it downwards.
.