@nullvoxpopuli Yes!
Wikipedia has output style tags in the body of most articles for a decade without issue.
* https://en.wikipedia.org/wiki/Universe — 18 style tags.
* https://en.wikipedia.org/wiki/Banana — 16 style tags.
To put that in context:
* We spent time *this* year investigating an issue with Firefox 52 on WinXP. If there's an edge case, we hear about it and a volunteer or staff may prioritise it.
* Our pages have one of the best perf among top sites. https://www.mediawiki.org/wiki/Wikimedia_Performance_Team#Milestones
The MediaWiki software gives editors the ability to use "templates".
The infobox you see aside many articles is such a template.
These are re-usable macros (a bit like web components) that include another page, called with parameters. There you can use variables, conditionals, and can embed a stylesheet.
We then output this in the HTML before the first call to that template on a given page (deduplicated).