JavaScript Programming JavaScript > Code Examples wrap(elem): Wrap each matched element with the specified element wrap(elem): Wrap each matched element with the specified element <html> <head> <title>I Love Happy Codings :-) I Love Web Development</title> <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("p").wrap(document.createElement("b")); }); </script> </head> <body> <b>I Love Happy Codings :-) I Love Web Development</b> <p>I Love Happy Codings :-) I Love Web Development</p> </body> </html>