Don’t you mean rem? If you use em like that you have to make sure that you don’t multiply your font size more than once when nesting elements.
Of course you could also have distinct heading classes or equivalent selectors for different contexts, and specify every case in rem, if that's how you like your stylesheets.