To retrieve an attribute of HTML tag using jQuery see the following details:-
Please visit the set/get attribute to see more information about attr() method like:- get attribute value and set attribute single or multiple values.
attr():- attr() is a method that is used to return the attribute value, it returns the value of the FIRST matched element.
Syntax:- $(selector).attr(attribute)