Here's how it works:
* Phenol reacts with formaldehyde in the presence of a base catalyst (like NaOH).
* The formaldehyde undergoes electrophilic aromatic substitution with the phenol.
* The initial product is a hydroxymethylphenol, which undergoes further reaction with formaldehyde to form p-hydroxybenzaldehyde.
The reaction can be summarized as:
Phenol + Formaldehyde → p-Hydroxybenzaldehyde
This reaction is important in organic chemistry for the synthesis of various aromatic compounds, including pharmaceuticals and dyes.