Final answer:
Halogens have a -I effect due to their electronegativity, but when attached to a benzene ring, they also exhibit a +M effect through resonance, making them o-p activators in electrophilic aromatic substitution. The correct answer is D. -I and +M effects.
Step-by-step explanation:
Halogens are often thought of as electron-withdrawing due to their high electronegativity, which can give them inductive effects (-I effect). However, when halogens are attached to a benzene ring, they are also capable of donating electron density through their lone pairs via resonance effects (+M effect).
This dual nature results in halogens being ortho-para directing and activating groups in electrophilic aromatic substitution reactions. Despite their electron-withdrawing inductive effect, the resonance effect of halogens on a benzene ring can sufficiently increase the electron density on the ortho and para positions, making these positions more reactive towards electrophiles.
Therefore, the correct answer to the question is D. -I and +M effects, because halogens exhibit a -I (electron-withdrawing inductive effect) but at the same time, they show a +M (electron-donating resonance effect) when attached to a benzene ring.