HTML5 data attributes provide a way to store custom private data with elements without following existing standards. The data- prefix is used to attach arbitrary data to elements through attributes like data-age and data-target. This private data does not affect layout or presentation and is intended for use by site scripts, not as a public extension. Browsers that support HTML5 doctypes will support data attributes through the dataset property in JavaScript, though getAttribute may need to be used instead for some browsers. Data attributes can be used to store parameters, heights, or other values needed by JavaScript.