Home
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"> </script> <script> $(document).ready(function () { $('p').append('This is paragraph.'); // appends text to all p elements $('div').append('This is div.'); // appends text to all div elements }); </script> <style> div{ border: 1px solid; } p{ border: 1px dashed; } </style> </head> <body> <div> <p></p> <p></p> </div> <p></p> <div></div> </body> </html>
Result: