For the general #mastodev public, on the note of custom formatting within toots:
Since toots federate with the HTML built in, it's entirely possible to pass custom HTML styling tags within those toots. However, by default, mastodon will strip most of that information when displaying it in the web app.
I do not know how most regular apps handle it.
However, you can pretty easily alter your own instance to whitelist a more encompassing list of tags and classes.