For all cases like these, "margin auto" should be a better option, but here on Fandom, if you want things to be centered also for mobile users, you'll have to use <center>. On legacy or on UCP wikis, to align text or images also on mobile, use the HTML tag <center>. The mobile skin destroys everything inside the "style" attribute, but I cannot change any HTML tag, and is forced in most cases to render the default style for that tag.
That said, also note that centering things for mobile and for desktop users hasn't the same impact, because mobile devices do not have much spare horizontal spaces. If a thing is centered or not there, most people won't even notice. So, just a few things to consider when you're going to chose your method.