<!DOCTYPE html>
<html lang="en-US">
<body>
<h1>CSS display Property</h1>
<p>This is paragraph. <span>This is span inside paragraph.</span></p>
<button onclick="myFunction()">Click Me</button>
<script>
var x = document.getElementsByTagName("span")[0];
function myFunction(){
x.style.display = "none";
}
</script>
<p><strong>Note</strong>: Click on the button to remove <span> tag inside <p> tag.</p> </body>
</html>