---
title: DOMRectReadOnly.x
slug: Web/API/DOMRectReadOnly/x
tags:
  - API
  - DOM
  - DOMRectReadOnly
  - Geometry
  - Property
  - Reference
browser-compat: api.DOMRectReadOnly.x
---
{{APIRef("Geometry Interfaces")}}

The **`x`** read-only property of the **`DOMRectReadOnly`** interface represents the x coordinate of the `DOMRect`'s origin.

## Syntax

```js
var recX = DOMRect.x;
```

### Value

A double.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("DOMRect")}}
