Despite their -I effect, halogens are o and p-directing in haloarenes. Explain

Halogens are moderately deactivating group. Because of their strong —I effect, overall electron density on benzene ring decreases. However, due to resonance the electron density on o and p-positions is greater than that at m-position. Hence, they are also o and p-directing groups.