What are Data Attributes
Last updated
Was this helpful?
Last updated
Was this helpful?
Created: 20.03.2023
Author: Anastasia Nogovitsyna
A data
attribute is a custom attribute that allows you to store additional information within standard HTML elements. data
attributes are regular HTML attributes that can be accessed in . The name of a data attribute always begins with data-
(e.g., data-testid
).
data-
attributes are a standard solution for storing user-specific metadata associated with elements.