element.setAttribute(<name>, <value>);
// ex
var aElement = document.querySelector("a");
aElement.setAttribute("href", "https://isitchristmas.com/");
// same as <a href="https://isitchristmas.com/"></a>
element.setAttribute(name, value);
element.setAttribute("style", "background-color: red;");
Element.setAttribute(name, value);