Search code examples
githubmarkdowngif

Center .gif in Github Readme horizontally


I'm trying to center gif, here is the markdown code:

![Demo](demo.gif)

The code above align my gif in the left (See below image):

enter image description here

So, I tried to put the markdown inside <p> tag like this but it does not work:

<p align="center">
![Demo](demo.gif)
</p>

My question: I want to center .gif in Github README horizontally, is there a way to do it? Example of what I want:

enter image description here


Solution

  • Solution:

    Instead of using markdown, I used <img> tag. Here is my code:

    <p align="center">
      <img src="demo.gif" alt="animated" />
    </p>