Redactor won't allow simple styling in heading tags
Rich Text fields in Craft have several options to them that can affect code output. In your field settings, make sure you don't have Clean up HTML? ticked. As the description reads, this option:


  Removes spans, empty tags, and most style attributes on save.


Without seeing your field, this is a wild guess at what could be the problem.