Yes mass of each element in a compound depend on the amount of compound.
The law of definite proportions, which asserts that a particular chemical compound always includes the same components in exactly the same proportions by mass, was discovered after it was discovered that mass was always conserved in chemical reactions. Any sample of pure water, for instance, has an oxygen content of 88.81% and a hydrogen content of 11.19% by mass. It doesn't matter how or from where the water sample was prepared. Like every other compound, its makeup is fixed and ,in case of mass of the compound the molecular mass is algebraic sum of mass of all elements present in the compound.
To learn more about compounds:
https://brainly.com/question/13516179
#SPJ4