I have a scenario where I need to pull the title from a img tag like below.
<img alt="Bear" border="0" src="/images/teddy/5433.gif" title="Bear"/>
I was able to get the image url. But how do i get the title from the img tag.
From above title = “bear”. I want to extract this.
Use
Element#attr()to extract arbitrary element attributes.See also: