# Custom data attribute

*noun*

say it: **“KUS-tum DAY-tuh AT-rih-byoot”** **/ˈkʌstəm ˈdeɪtə ˈætrɪbjuːt/**

An HTML attribute starting with data-, such as data-product-id, that stores extra values on an element for scripts.

## What is **Custom data attribute**?

**Custom data attribute** — An attribute beginning with data- that stores page-specific data on an element.

```html
<button data-order-id="A1042">View order</button>
```

## In a sentence

- “Each button has a **data attribute**, data-product-id, so the script knows which product to add.”

Level: Journeyman · [More HTML terms at this level](https://www.ask-codey.com/glossary?category=html&level=3)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/custom-data-attribute
