Pixel density
The number of pixels that fit into an inch is referred to as pixel density.
Density independence
Density independence refers to the uniform display of UI elements on screens with different densities.
Pixel density on Android
When developing an Android app, use dp to display elements uniformly on screens with different densities.
Pixel density on iOS
iOS determines density using logical resolution, which measures its units in points.
Pixel density on the web
Logical resolution
Use the device's logical resolution, which scales to the device's screen resolution.
Units for the web
When designing for the web, replace dp with px (for pixel).