Difference Between Attribute vs Property in Jquery

What is a property? JS DOM objects have properties. These properties are kind of like instance variables for the particular element. As such, a property can be different types (boolean, string, etc.). Properties can be accessed using jQuery’s prop method (as seen below) and also by interacting with the object in vanilla JS. Let’s take a look: <a href='page.html' class='link_classes' name='linkName' id='linkID'>Hi</a> $('#linkID').prop('href'); // returns "http://example.com/page.html" $('#linkID').prop('name'); // returns "linkName" $('#linkID').prop('id')