<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Inserting HTML Contents At the End of the Elements in jQuery</title> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script> $(document).ready(function(){ // Append all paragraphs on document ready $("p").append(' <a href="#">read more...</a>'); // Append a div container on button click $("button").click(function(){ $("#container").append("This is demo text."); }); }); </script> </head> <body> <button type="button">Insert Text</button> <div id="container"> <p>First paragraph</p> <p>Second paragraph</p> </div> </body> </html>