1<!doctype html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <title>empty demo</title>
6 <style>
7 p {
8 background: yellow;
9 }
10 </style>
11 <script src="https://code.jquery.com/jquery-3.4.1.js"></script>
12</head>
13<body>
14
15<p>
16 Hello, <span>Person</span> <em>and person</em>.
17</p>
18
19<button>Call empty() on above paragraph</button>
20
21<script>
22$( "button" ).click(function() {
23 $( "p" ).empty();
24});
25</script>
26
27</body>
28</html>
29