<!DOCTYPE html>
<html lang="en-US">
<body>
<p style="color:blue;">Click on the button to remove 'style' attribute of this paragraph.</p>
<button onclick="myFunction()">Click Me</button>
<script>
var elem = document.getElementsByTagName("p")[0];
function myFunction(){
elem.removeAttribute("style");
}
</script> </body>
</html>