Suppose elements A and B react to form two compounds. Masses of B that combine with a fixed mass of A can be expressed as a ratio of small whole numbers.
Consider, the two compounds of the elements carbon and oxygen; call them carbon oxides I and II.
I and II have different properties; under same conditions, the density of carbon oxide I is 1.25 g/L, whereas that of II is 1.98 g/L.
Carbon oxide I: 57.1 mass % oxygen and 42.9 mass % carbon
Carbon oxide II: 72.7 mass % oxygen and 27.3 mass % carbon