How To Center An Image In Markdown


01: <div align="center">
02:     <img src="/images/centered-image.png">
03: </div>

Important: Do note that the inline CSS attribute align although still working has long been deprecated. It works in about 80% of modern browsers and there is no official date when it will be removed.

It's the simplest way to center objects in Markdown, but if you prefer a lengthy but safer approach you can use the code below.


01: <img style="display:block;margin:auto" src="/images/centered-image.png">

Here is another article for you 😊 "5 terms to know as a technical writer [part 1]"