Based on the law of definite proportion, a chemical compound is always made of the same proportion of elements by mass irrespective of the method in which it is prepared.
The chemical formula for water is H₂O i.e. 2 units of H combines with 1 unit of O. Thus the ratio by mass of H:O is 2:16. This ratio will remain unchanged even if the amount of water is double from 18 g to 26 g.