Sodium chloride, on the other hand, contains ions; it is an ionic compound. Ionic compounds contain ions and are held together by the attractive forces among the oppositely charged ions. Common salt (sodium chloride) is one of the best-known ionic compounds.