How to remove HTML element styles via JavaScript? Spread the love To remove HTML element styles via JavaScript, we call the removeAttribute method. For instance, we write element.removeAttribute("style"); to call removeAttribute to remove the style attribute from the element. Related