Check if an attribute with a specified name exists using the hasAttribute() method.
Attributes
This section shows you how to manipulate the element’s attributes including getting, setting, and removing attributes.
Remove an Attribute from an Element
Remove an attribute from an element using the removeAttribute() method.
Set the Value of an Attribute
Set a value for an attribute of an element using the setAttribute() method.
Get the Value of an Attribute
Get the attribute value of an element using the getAttribute() method