Garbage after saving letter head

hello,

I am using earlier version 11 , HTML editor for letter head so after saving the html code at place of brackets its generating garbage
CSS also affecting on other elements of rest of page. like if we use standard h1 tag and used css then it will also change the other things which are header on rest of page.

bellow screenshot before saving


bellow screenshot contains the change after saving

please suggest the solution

thank you…