Run ยป
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("p").before("<h1>www.studentstutorial.com</h1>"); $("button").hide(); }); }); </script> </head> <body> <button>Insert content before each p element</button> <p>This is a tutorial website for all technology.</</p> </body> </html>