The lone pair of electrons on the oxygen atom of the phenolic group enter into conjugation with the benzene ring due +M effect of the phenolic group. As a result, the ortho and para position become electron-rich compounds to the meta position. Hence the electrophilic attack the ortho and para position.