HTML Editor
<!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 &lt;span> tag inside &lt;p> tag.</p> </body> </html>
OUTPUT
×

Save as Private