The right way is to follow the HTML standard. You can validate your HTML page here.
Your mail client should follow it and should throw away what’s not supported or what’s insecure, like JavaScript.
I’ll expose some reasons why following standards could be beneficial here:
- a webmail willing to show your mail as a full page, could keep your format.
- a webmail will simply strip the tags and attributes it doesn’t want. But you can never know which ones.
- It’s easier to find (server side) components that follow format standards, and thus are less error prone. Parsers not following standards could possibly break, making your email not getting shown.