If you're putting any custom HTML code into a WYSIWYG editor, it will auto-format the HTML and typcally strip out any formatting you want. Best option is to use a static text webpart without any kind of WYSIWYG editor attached. This will allow you to input any kind of text/html you want without any custom formatting.