Possible to add span tag with class within every heading and paragraph tag?

Inside each of my heading, paragraph, anchor, and list tags I’m needing to include a span tag with class so that I can add a background color to each line of text throughout the site (e.g. <p><span class="bg_white">The text.</span></p>, etc.). Is there a simple way to do this?

Do you mean, each span tag should have a different class, etc.?

No, a single class should work just fine.

You might want to have a look at filters which would allow you to do a simple find and replace with regular expressions.

Although what you want to achieve is possible, that’s not very elegant. Assuming you have control over the CSS for the site, you may want to rethink that approach. Otherwise you might just need to do it like @twirx suggested.