Java script get element by tag name code example
Example 1: javascript get element by id
var element = document.getElementById("YourElementId");
Example 2: javascript get element by rel attribute
document.querySelectorAll('[rel="prev"]')[0].innerHTML = "Older posts";