Yes, it is true. The chemical composition or ratio of two or more elements forming a compound always remains the same. For example, no matter where we take water from, its elements will always be 2 atoms of hydrogen and 1 atom of oxygen, combined in the fixed ratio of 2:1.