Hydrogen is used as fuel for rockets as well as the fuel for hydrogen fuel cells in cars. It burns in oxygen to form water.
hydrogen + oxygen → water
2H2 + O2 → 2H2O
The flame is almost colourless. Mixtures of hydrogen and oxygen – or hydrogen and air – can be explosive when the two gases are present in a particular ratio, so hydrogen must be handled very carefully.
However, at the moment, most of the hydrogen used in the world is obtained from fossil fuels, so carbon dioxide is still released during the overall process. It is possible to form hydrogen from electrolysis of water, but this uses a lot of electrical energy. It is also a highly flammable gas and can explode, making it potentially more dangerous than oil-based fuels.
As hydrogen is a gas, it must be cooled and compressed to make it into a liquid for storage. The storage tanks must be extremely strong to withstand the high pressures and also insulated to keep it cold. It must be kept at around –250°C. This makes it much more difficult and expensive to store and transport than liquid fuels, such as petrol or diesel.