html data property code example
Example 1: get data attribute javascript
//
const el = document.querySelector('#element')
el.dataset.name // 'john'
Example 2: html data attribute
This tag contains a user-defined color attribute
This tag contains a data attribute with a link