Hydrogen is the first element in the periodic table. It can form positive ions like alkali metals and negative ions like halogens. It exists as diatomic molecules (H2). There are three isotopes of hydrogen: protium, deuterium, and tritium. Dihydrogen is produced commercially through electrolysis and from the reaction of steam with hydrocarbons. Dihydrogen reacts with many elements and is used to produce ammonia and other important compounds. It forms ionic hydrides with electropositive metals, covalent hydrides with nonmetals, and metallic hydrides with transition metals.