# What are Data Attributes

Created: 20.03.2023&#x20;

Author: Anastasia Nogovitsyna

{% hint style="info" %}
HTML elements have attributes. These are the values that configure elements or regulate their behavior in various ways to meet user criteria.
{% endhint %}

A <mark style="color:red;">`data`</mark> attribute is a custom attribute that allows you to store additional information within standard HTML elements. <mark style="color:red;">`data`</mark> attributes are regular HTML attributes that can be accessed in [CSS](https://developer.mozilla.org/en/docs/Web/CSS). The name of a data attribute always begins with <mark style="color:red;">`data-`</mark> (e.g., <mark style="color:red;">`data-testid`</mark>).

{% hint style="info" %}
Any attribute whose name starts with \`<mark style="color:red;">`data-`</mark>\` is a \`<mark style="color:red;">`data-*`</mark>\` attribute.
{% endhint %}

<mark style="color:red;">`data-`</mark> attributes are a standard solution for storing user-specific metadata associated with elements.

{% hint style="info" %}
Example usage: <mark style="color:red;">`data-sku="12345"`</mark>
{% endhint %}
