The Screen Orientation API provides information about the orientation of the screen.
ScreenOrientation