how to look for the attribute of html element in javascript code example
Example: get element attribute javascript
var x = document.getElementsByTagName("H1")[0].getAttribute("class");
var x = document.getElementsByTagName("H1")[0].getAttribute("class");