Incorporation of one of the halogen elements, usually chlorine or bromine, into a chemical compound. Thus benzene (C6H6) is treated with chlorine to form chlorobenzene(C6H5Cl), and ethylene (C2H4) is treated with bromine to form ethylene dibromide (C2H4Br2). Compounds of chlorine and bromine are sometimes used as the source of the halogen, e.g., phosphorus pentachloride.