Answers for "html custom attributes"

12

js get data attribute

var element = document.querySelector('.element');
var dataAttribute = element.getAttribute('data-name');
// replace "data-name" with your data attribute name

console.log(dataAttribute);
Posted by: Guest on February-03-2020
2

html5 prefix

<!DOCTYPE html> <!-- This tag shows that it is running HTML5 -->
Posted by: Guest on March-09-2020

Code answers related to "html custom attributes"

Code answers related to "Javascript"

Browse Popular Code Answers by Language