HTML attributes are used to define the characteristics of an HTML element. They are placed within the element’s opening tag and consist of…