JavaScript – Clear Inline Style of Paragraph
To clear Inline Style of a paragraph using JavaScript, get the reference to the paragraph element, and assign empty string value to the element.style
property.
Note: This solution clears only the inline style. Any global styles using style sheets shall be applied to the element.
Example
ADVERTISEMENT
Conclusion
In this JavaScript Tutorial, we learned how to clear inline style of a paragraph using JavaScript.