[ad_1]
For the given html, the following will print the content inside each heading.
var headings = document.getElementsByTagName('h1');
for(i=0;i<headings.length;i++){
console.log(headings[i].innerHTML);
}
[ad_2]
solved get title from heading tag