Why do liquids and gases take the shape of their containers?
1 Answer
Simple answer is that they are both fluids.
Explanation:
Liquids differ from solids and gasses as the bonds between atoms (elements) are weak enough for the atoms to move around within the substance but are not enough to break these bonds and "fly" off in different directions.
This ability for a liquid to move around within due to it's weaker IMF's (forces between molecules) than solids are the reason why they can fill the shape of containers as the IMF's are not strong enough for them force the substance into a definite shape.
The properties of gasses such as it's super weak IMF's (weaker than both solids and liquids), allows particles to not be attached to other molecules and it essentially allows the gas to go out and expand in all directions until met with another force in which a collision will occur and the gas particle will change direction and fly out.