madox2 madox2 - 3 months ago 140
Markdown Question

Is it possible to add border to image in GitHub markdown?

I need to add border to the image in GitHub README.md file. This is how image should be embeded:

![GitHub Logo](/images/logo.png)


I have tried to wrap image with the table:

|--------------------------------|
|![GitHub Logo](/images/logo.png)|


but it is not possible to create table without header.

I have also tried to include image as html tag:

<img src="/images/logo.png" style="border: 1px solid black" />


but without success. Is there any way how to do this?

Answer

It's hacky and not always pretty, but surround the image with a <kbd> tag. Here's an example with an image of a white square:

Before:

<img src="http://www.polyvore.com/cgi/img-thing?.out=jpg&size=l&tid=89263488">

After:

<kbd>
  <img src="http://www.polyvore.com/cgi/img-thing?.out=jpg&size=l&tid=89263488">
</kbd>