What does the term 'by mass' mean with respect to different contexts?
In $\ce{H2O}$, the proportion of $\ce{H}$ counted by atoms is $\ce{2/3 = 66.7}$ %. In the same $\ce{H2O}$, the mass of $\ce{2 H}$ is $2$ u. As the mass of $\ce{1 O}$ is $16$ u, the proportion of H by mass in $\ce{H2O}$ is $2/18 = 11.1$%. This percentage $11.1$% is rather different from $66.7$%