1$(yourElement).html("New text");
2//sets yourElement innerHTML to "New text"
3var text = $(yourElement).html();
4//html() returns the text inside yourElement if you pass no parameters
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 id="pda">Salom html.</p>
20<p></p>
21
22<script>
23$("#pda").html("New text");
24</script>
25
26</body>
27</html>