Question: I want to find a specific tag in a html code like if there are 2 tags then how can i get the contents of the second tag and not the first one which soup.find(id='contact1') does here is the example html code

```
<table align="center"><th id="contact">STUDENT ID</th><th id="contact">NAME</th><th id="contact">   Phone </th><th id="contact"> NO.</th>
<p align="center" style="display:compact; font-size:18px; font-family:Arial, Helvetica, sans-serif; color:#CC3300">
</p><tr>
<td id="contact1">
2011XXA4438F </td> <td id="contact1"> SAM SRINIVAS KRISHNAGOPAL</td> <td id="contact1"> 9894398690 </td> <td id="contact1"> </td>
</tr>
</table>

```

What i want to do is to extract '2011XXA4438F' as a string how can i do this?

Answer: 
`<td id="contact1">` is the *first* tag with an id of `"contact1"`. To obtain it, then `soup.find` is all you need:

```
>>> print soup.find(id='contact1').text.strip()
2011XXA4438F

```

If you're looking for other tags, then you'll want to use `find_all`:

```
>>> print soup.find_all(id='contact1')
[<td id="contact1">
2011XXA4438F </td>, <td id="contact1"> SAM SRINIVAS KRISHNAGOPAL</td>, <td id="contact1"> 9894398690 </td>, <td id="contact1"> </td>]

```
You can also do it this way:  

target = soup.find("table", {"id": "contact1"})