Why there is no formatting command to center images in Stack Exchange posts?

  • 2
    Probably because Markdown itself doesn't support alignment. You can't center text either. I've tried to work around this with inline HTML, but either my HTML-fu is leaving me or it simply doesn't work fully on SE.
    – Mast
    Nov 8, 2019 at 6:36
  • 3
    Why should there be one? Nov 8, 2019 at 11:31

1 Answer 1


Why? It's not part of standard Markdown, and Stack Exchange only supports a limited set of HTML elements/attributes, to limit the complexity. New features have to be developed and maintained over time, so they chose to support only features they deemed essential. Centering images is apparently not one of them; note that in the official mobile apps, all images are centered automatically.

That said, there are some tricks to center images, e.g. using <pre> tags or &nbsp;; see Is it possible to horizontally center an image on Stack Exchange sites? for more details.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .