---
title: HTMLDataElement.value
slug: Web/API/HTMLDataElement/value
tags:
  - API
  - HTML DOM
  - HTMLDataElement
  - Property
  - Reference
  - data
  - value
browser-compat: api.HTMLDataElement.value
---
{{APIRef("HTML DOM")}}

The **`value`** property of the {{domxref("HTMLDataElement")}}
interface returns a {{domxref("DOMString")}} reflecting the {{htmlattrxref("value",
  "data")}} HTML attribute.

## Syntax

```js
var aValue = htmlDataElement.value
htmlDataElement.value = aValue
```

### Value

A {{domxref("DOMString")}}.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
