Check out example codes for "beautifulsoup search for elements with attributes". It will help you in understanding the concepts better.

Code Example 1

soup = BeautifulSoup(html)
results = soup.findAll("td", {"valign" : "top"})

Learn ReactJs, React Native from akashmittal.com