Since metals tend to lose electrons and nonmetals tend to gain electrons, metals and nonmetals like to form compounds with each other. These compounds are called ionic compounds. When two or more nonmetals bond with each other, they form a covalent compound.