What are Data Attributes
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 CSS. 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.
Last updated
Was this helpful?