To analyze the properties and mechanisms of six types of intramolecular resonance-assisted halogen bonds (Br⋯O, Cl⋯O, F⋯O, Br⋯O, Cl⋯S and F⋯S), we have chosen the five-membered closed ring system X–C1R1= C3R2–C2R3= Y (X = Br, Cl & F; Y = O & S) of unsaturated compounds with the substituents NO2, CH3and H.