---
title: VisualViewport.pageTop
slug: Web/API/VisualViewport/pageTop
tags:
  - API
  - Property
  - Reference
  - Visual Viewport API
  - VisualViewport
  - pageLeft
  - viewport
browser-compat: api.VisualViewport.pageTop
---
{{APIRef("Visual Viewport")}}

The **`pageTop`** read-only property of the
{{domxref("VisualViewport")}} interface returns the y coordinate of the top edge of the
visual viewport relative to the initial containing block origin, in CSS pixels.

## Syntax

```js
var pageTop = VisualViewport.pageTop
```

### Value

A double.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
