Density is the amount of mass in a specified space. It is a way to measure how compact an object is. It is the number of molecules in an area or the mass per unit volume of matter. The denser an object is, the less likely it is to float.
Density can be better explained to kids by using an example. Two identical boxes in size and in shape are both filled with objects. One is stuffed with cotton balls, and the other is filled with marbles. The box containing marbles is heavier and denser than the box full of cotton balls. The contents of the denser box are closely arranged together compared to the contents of the other, which has lots of air in between.
Another good example is transferring gas inside a small bottle to a bigger bottle. The gas is less dense in the bigger container. The number of gas molecules is preserved, but it is more spread out when it fills the bigger bottle. There are fewer gas molecules in a set volume compared to when it is occupying the smaller bottle and the molecules are closer together.