Edit in JSFiddle

$(document).ready(function () {
                $("#myButton").click(function () {
                    $("#targetP").prepend($('span'));
                });
            });
 <html>
        <head>
        <title>prepend</title>
        </head>
        <body>
        <span>This is 99codingexamples.</span>
        <p id="targetP">This is p element.</p><br />
        <input type="button" id="myButton" value="Prepend"/>
        <input type="button" id="reset" value="Reset" onclick="location.reload()" />
        </body>
        </html>