I'm modifying a HTML file using Python and BeautifulSoup, and I can change the content of headers, but I couldn't find a way to change the class of a div. My goal is to turn: <div id="div1" class="blue_titles">test</div> Into: <div id="div1" class="green_titles">test</div> I looked up and down the docs, but to no avail. It's probably right in my face, but I can't find it. Continue reading...