It makes no difference whether it’s pasta water or any other kind of water. The lid keeps the heat trapped inside the pot.
The bubbles in boiling water consist of steam (that is, vaporized water), not air. When the bubbles come to the surface, they contact the air, and since the air is cooler than the water, the bubbles cool off, and the steam turns back into water, and the bubbles collapse. If the lid is in place, the air in the space above the water gets hotter until it is the same temperature as the water. Then it doesn’t make the bubbles collapse anymore.
Latest Answers