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);
}
solved get title from heading tag
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);
}
solved get title from heading tag