if you want to select any html tag using javascript the below function is used
document.getelementsbytagname("HtmlTag");
if you want to set any attribute for any html tag using javascript the below function is used
document.getElementsByTagName("HtmlTag")[0].setAttribute("Property", "Value");