---
title: Window.orientation
slug: Web/API/Window/orientation
tags:
  - NeedsContent
browser-compat: api.Window.orientation
---
{{APIRef}}{{deprecated_header}}

Returns the orientation in degrees (in 90-degree increments) of the viewport relative to the device's natural orientation.

Its only possible values are `-90`, `0`, `90`, and `180`. Positive values are counterclockwise; negative values are clockwise.

This property is deprecated. Use the {{domxref("Screen.orientation")}} property instead, available on the {{domxref("window.screen")}} property.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
