For hydrogen fuel cell to produce electricity, hydrogen will need to be supplied to the anode. To split oxygen and hydrogen from water and obtain hydrogen, we need to use electrolysis. To use electrolysis, we need to use a battery.
My question is, why do we bother splitting up hydrogen and oxygen and then feed it into the fuel cell instead of just using battery to generate electricity? Or is it not practical to obtain hydrogen and oxygen from electrolysis and use it to generate electricity from fuel cell? Thank you