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.

Leave a Reply

Your email address will not be published. Required fields are marked *