Presence of electron withdrawing groups (– NO 2 , –X, – CN) increase the acidity of phenols while the presence of electron releasing groups (– NH 2 , – CH 3 ) decrease the acidity of phenols.
This explains the following order of acidity. p-nitrophenol > phenol > p-cresol.