This shouldn't work. As you note one line above, there are at least two &lt;a> elements that are descendants of the &lt;tr>, so this would return a list of multiple href attributes separated by a comma.