HTML data attributes, often referred to as data-* attributes, allow you to store extra information on standard HTML elements. The * in data-* can be replaced with any custom name you want, as long as it starts with data- and contains only letters, numbers, hyphens, and underscores. These attributes are often used to store custom data that can be accessed via JavaScript.
HTML Data Tag
In HTML, a data tag doesn't actually exist, but what you might be referring to is the use of data attributes that allow you to store extra information on standard, semantic HTML elements without having to use non-standard attributes or cluttering the markup.
HTML Data Tag with Example
<!DOCTYPE html> <html lang="en"> <head> <title>Data Attribute with Example</title> </head> <body> <div id="product-1" data-product-id="123" data-category="Technology" data-stock="25"> Product Name: Smartphone </div> </body> </html>