In some reactions such as C6H5ONa with alkyl halide, alkyl phenyl ether is formed, i.e, C6H5O-R in which hydrogen(here Na) is substitued by R. In other cases such as reaction of phenol with bromine water, 2,4,6-tribromophenol is formed (just like in most electrophilic substitution reactions, like kolbe schmitt reaction etc.) where hydrogn at ortho/para position is substituted.
So my question is why in first case R (alkyl group for alkyl halide) is not added to ring ortho/para as in case of friedel craft alkylation? Or in second case Br is not added to oxygen atom?
Is there any specific reason as to why in some cases the hydrogen of oxygen atom in phenol is substitued over the hydrogen atom at the ortho/para position of the ring?
Same is true in case of aniline, eg, in acetylation of aniline, CH3CO is added to nitrogen atom and not to the ring...
It would be really helpful if someone could clarify where my understanding is wrong. Thanks!
Edit:
My question arose out of this problem in which the reagent on the left is attacking the one on the right through its ortho position (Carbon labeled as 1 in picture) as per answer which is (A). I understand why it attacks the vinyl carbon (in second molecule) but not why it attacks through the ortho carbon and not through the oxygen atom.