I want to end up with:
Hello there!
<image>
This is an image
Hi!
Where the image and the text This is an image
are centered on the page. How do I accomplish this with Markdown?
Edit: Note that I'm looking to horizontally center the image and text on the page.
In Mou (and perhaps Jekyll) this is quite simple.
So taking that in mind you can apply this to the img syntax.
This syntax doesn't work for Markdown implementations that implement only what is documented on Daring Fireball.
I figured that I'd just have to use HTML where I want to horizontally align anything.
So my code would look like this:
With kramdown (used by githubpages)
Or using the response from @(Steven Penny)
I'm surprised no one mentioned this way:
If you are using kramdown, you can do this
I think I have a simple solution that will work given that you can define CSS. It also does not require any extensions or HTML! First your markdown image code:
Note the added url hash #center.
Now add this rule in CSS:
You should be able to use a url hash like this, almost like defining a class name.
To see this in action, check out my JSFiddle using SnarkDown to parse MarkDown in a textarea - https://jsfiddle.net/tremor/6s30e8vr/