1<!doctype html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <title>text demo</title>
6 <style>
7 p {
8 color: blue;
9 margin: 8px;
10 }
11 b {
12 color: red;
13 }
14 </style>
15 <script src="https://code.jquery.com/jquery-3.5.0.js"></script>
16</head>
17<body>
18
19<p><b>Test</b> Paragraph.</p>
20<p></p>
21
22<script>
23var str = $( "p" ).first().text();
24$( "p" ).last().html( str );
25</script>
26
27</body>
28</html>
29