Welcome to Rene Escobar!

Web Developer in Washington, D.C.

HTML Data Attributes

Custom data attributes are intended to store custom data private to the page or application, for which there are no more appropriate attributes or elements. <div id=’strawberry-plant’ data-fruit=’12’></div> In this example, strawberry plant has a custom data-* attribute that can be used with JS libraries. In order to read the attribute using plain old js: