Skip to content

Glossary: JavaScript in the Browser

data- attributes / dataset

Also written: dataset, data-*

Attributes starting with data- hold facts for your code, such as a product's SKU. JavaScript reads and writes them through dataset, always as strings.

Where the book teaches it

Related terms

camelCaseSKU (stock keeping unit)