MRTapas Adhikary You can, of course, access any HTML attribute with getAttribute(), however the 'dataset' property is what makes 'data-*' attributes special and much more convenient to use. Thanks for updating the article.Reply·Article·Aug 16, 2020·10 useful HTML5 features, you may not be using
MRThat's not how you access data-* attributes from Javascript. Use elm.dataset.fooComment·Article·Aug 16, 2020·10 useful HTML5 features, you may not be using