Step 1: Nitro group (\(-\mathrm{NO_2}\)) is a strong electron-withdrawing group and increases acidity.
Step 2: In aqueous medium, p-nitrophenol is more acidic than o-nitrophenol due to intramolecular hydrogen bonding in o-nitrophenol, which reduces ionization.
Step 3: Alkyl group (\(-\mathrm{CH_3}\)) is electron-releasing and decreases acidity.
\[
\text{p-Nitrophenol} > \text{o-Nitrophenol} > \text{Phenol} > \text{Cresol}
\]