How to insert a DOM element after all paragraphs using jQuery ? Last Updated : 31 Dec, 2020 Comments Improve Suggest changes Like Article Like Report In this article, we will insert a DOM element after all paragraph elements using jQuery. To insert a DOM element we use after() and createTextNode() methods. The createTextNode() method is used to create a TextNode which contains an element node and a text node. It is used to provide text to an element. The after() method is used to insert the specified content after each selected element. Syntax: $( selector ).after( content ); Example: HTML <!DOCTYPE html> <html> <head> <!-- Import jQuery from CDN library --> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <script> $(document).ready(function () { $("button").click(function () { $("p").after(document .createTextNode("Hello World!")); }); }); </script> </head> <body style="text-align: center;"> <h1 style="color: green;"> GeeksforGeeks </h1> <h3> How to insert a DOM element after all paragraphs using jQuery? </h3> <p> GeeksforGeeks computer science portal </p> <button>Click Here!</button> </body> </html> Output: Before clicking the button: After clicking the button: Comment More infoAdvertise with us Next Article How to insert a DOM element after all paragraphs using jQuery ? V vkash8574 Follow Improve Article Tags : Web Technologies JQuery jQuery-Questions Similar Reads How to insert some HTML after all paragraphs using jQuery ? In this article, we will insert some HTML content after all paragraphs using jQuery. To add some content after all paragraph elements, we use the after() method. This method is used to insert the specified content after each selected element in the set of matched elements. Syntax: $( selector ).afte 1 min read How to insert a jQuery object after all paragraphs using jQuery ? The task is to insert a jQuery object after all the paragraphs using jQuery. Approach: Create DOM element or jQuery object using <span> tag.Create a paragraph using <p> tag.Create a button using button tag after clicking on which the object will be inserted after paragraph.Write a script 1 min read How to insert an object before all paragraphs using jQuery ? jQuery is a Javascript library to ease the task of web developers. Developers can use the Jquery library rather than using Javascript in their code. Jquery provides a lot of good features like DOM manipulation, event handling, AJAX support, etc. It is highly recommended to learn the basics of HTML, 2 min read How to find all paragraph elements using jQuery ? Given a webpage containing paragraph elements and the task is to find every paragraph element using the jQuery module. We have to find the <p> elements from the HTML page, and you can achieve this task by using the element selectors. The element selector will select the element based on the el 2 min read How to remove all paragraphs from the DOM using jQuery ? To remove elements and content, we use jQuery remove() method which removes the selected element as well as everything inside it, also it will remove all bound events associated with that target element. Syntax: $(selector).remove() Example : HTML <!DOCTYPE html> <html> <head> < 1 min read Like