The formula of water is
. Thus, molar ratio is 2:1.
Thus,

Number of moles are related to mass and molar mass as follows:

Here, m is mass and M is molar mass
Molar mass of hydrogen is 1 g/mol and that of oxygen is 16 g/mol

Converting molar ratio into mass ratio as follows:

Also,

Putting the values of molar mass,

Thus,

Thus, water is always made up of 32 part hydrogen to 1 part oxygen by mass.