get all h1 beautifulsoup

# to get all h1 from the page 
soup = BeautifulSoup('html_file', 'html.parser')
all_h1 = soup.find_all('h1')

Here is what the above code is Doing:
1. We’re creating a BeautifulSoup object from the html_file variable.
2. We’re using the find_all method to get all the h1 tags from the page.
3. We’re storing all the h1 tags in the all_h1 variable.