Horje

DATA attribute use - Data Attributes - HTML
Learn
HTML - Data Attributes - Data attribute use
Data Attribute Use

HTML5 data-* attributes provide a convenient way to store data in HTML elements. The stored data can be read or modified using JavaScript

<div data-submitted="yes" class="user_profile">
  … some content …
</div>

  • Data attribute structure is `data-*`, i.e. the name of the data attribute comes after the `data-` part. Using this name, the attribute can be accessed.
  • Data in string format (including `json`) can be stored using `data-*` attribute.
  • Read Article
    https://develop.horje.com/learn/1434/reference