The electrical properties of oxygen and hydrogen bubbles generated by water electrolysis are studied. In the near-electrode layer of the electrolyte, these bubbles acquire a charge that depends on the composition of the electrolyte and type of ions generated during water electrolysis. Charging of bubbles is due to accumulation of Hf or OH- ions within the limits of the slip plane, and the potential of bubbles may be many times higher than the electrokinetic potential in the bulk solution. The released oxygen (in alkaline media) or hydrogen tin acidic media bubbles acquire a dipole moment whose electric field coincides with that of the electrolysis. As a result, bubbles are repelled from the electrode in the direction perpendicular to its surface. Analysis of forces acting on the bubbles showed that the electrostatic and dipolophoretic forces under these conditions may be several orders of magnitude stronger than the buoyancy force.