//set the function to be called on onload event of the window.......... window.onload = myFunction; //now, define the function needed for creating a hyperlink as needed........... function myFunction() { var mydiv = document.getElementById("Tabs"); var aTag = document.createElement('a'); aTag.setAttribute('href',"http://www.rochestermn.gov/home/ShowDocument?id=4443"); aTag.setAttribute('target',"_blank"); aTag.setAttribute('class',"Tab NormalTab"); aTag.setAttribute('style',"color:white"); aTag.innerHTML = "   COW Schedule   "; mydiv.appendChild(aTag); }