imagemarkdownkramdown

Adding space between text and image in Markdown


In Markdown, you add an image as

![myimg](link)

Now, I can easily change the size and placement of said image using attributes as

![myimg](link){: height="75px" width="300px" align="left"}

How do I also make it so that there is also a (choosable) space between image and text? Parameters like border don't work.

Using Kramdown as converter, on Github pages, if that matters.


Solution

  • Markdown is not capable of designing layouts like this. You can use multiple non-breaking spaces ( ) to adjust the spacing between an image and text.

    Example:

    ![image](link)    text
    

    Result:

        text