Density is one of the most essential physical characteristics, which leads towards the generation of layers in the Earth. Density is illustrated as the mass per unit volume of a substance. Both the continental and the oceanic crust are less dense in comparison to the mantle. However, with the help of the diagram one can clearly see that oceanic crust is denser in comparison to the continental crust.
This is mainly the reason that why the continents are situated at a higher elevation in comparison to the ocean floor. The oceanic crust, continental crust, and the mantle exhibit different densities as they are formed of distinct types of rocks with different densities.