

Egg yolk contains mainly albumin protein. So in an acidic or basic medium, the proteins starts to denaturate, and hence the yolk is found to coagulate in acidic or basic medium. Denaturation takes place as the protein precipitates upon coming in contact with acids or bases.
