element.dataset can be used to access custom data attributes (data-* attributes) on an element. This property provides access to all data attributes as a DOMStringMap object, with the attribute names converted from kebab-case to camelCase (removing the 'data-' prefix). For example, if an element has data-user-id="123", you can access it as element.dataset.userId. This provides a cleaner interface than getAttribute('data-user-id') and works bidirectionally - changing dataset values updates the corresponding HTML attributes.