Hydrogen gas is collected by the downward displacement of water. Hydrogen is lighter than air so it is possible to collect the gas by downward displacement of air. But it is not safe to do so since a mixture of hydrogen and air can lead to an explosion.