// It will retrun all innerHTML value into console.log var elts = document.getElementsByClassName('nice-name'); for (var i = 0; i < elts.length; ++i) { console.log(elts[i].innerHTML); }