Hi makenzi.exc,
prop - It is used to get the attribute set when you create the HTML, example style, class, etc.
It does not work properly for dynamic attributes set during run-time.
Syntax:
$(selector).prop(property)
attr - It is used to fetch the value of dynamic attributes set during run-time.
Syntax:
$(selector).attr(attribute)
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>Welcome to ASPSnippets.com</div>
<span id="lblMessage" title="Welcome to ASPSnippets.com">Welcome to ASPSnippets.com</span>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
// jQuery prop.
$("div").prop("color", "purple");
alert($("div").prop("color"));
// jQuery attr.
alert($("#lblMessage").attr("title"));
});
</script>
</body>
</html>
Demo
Screenshot

Downloads
Download Sample