1<!doctype html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <title>remove demo</title>
6 <style>
7 p {
8 background: yellow;
9 margin: 6px 0;
10 }
11 </style>
12 <script src="https://code.jquery.com/jquery-3.5.0.js"></script>
13</head>
14<body>
15
16<p>Hello</p>
17how are
18<p>you?</p>
19<button>Call remove() on paragraphs</button>
20
21<script>
22$( "button" ).click(function() {
23 $( "p" ).remove();
24});
25</script>
26
27</body>
28</html>
29