Halogens always form anions, alkali metals and alkaline earth metals always form cations. Most other metals form cations (e.g. iron, silver, nickel), whilst most other nonmetals typically form anions (e.g. oxygen, carbon, sulfur).