Hi makenzi.exc,
text - Method returns the text content of the selected elements. It overwrites the content of all the matches element while setting the content.
html - Method is used to set or return the content (innerHTML) of the selected elements. It returns the content of the first matches element or sets the content of all matches elements.
Refer below example.
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
body { font-family: Arial; font-size: 10pt; }
</style>
</head>
<body>
<div id="message1"></div><br />
<input type="button" value="Set Html" onclick="SetHtml()" />
<input type="button" value="Get Html" onclick="GetHtml()" />
<hr />
<div id="message2"></div><br />
<input type="button" value="Set Text" onclick="SetText()" />
<input type="button" value="Get Text" onclick="GetText()" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script type="text/javascript">
function SetHtml() {
// Set using jQuery html.
$("#message1").html('<a href="https://www.aspsnippets.com">ASPSnippets</a>');
};
function GetHtml() {
// Get using jQuery html.
alert($("#message1").html());
};
function SetText() {
// Set using jQuery text.
$("#message2").text('<a href="https://www.aspsnippets.com">ASPSnippets</a>');
};
function GetText() {
// Get using jQuery text.
alert($("#message2").text());
};
</script>
</body>
</html>
Demo
Screenshot

Downloads
Download Sample