Explore Courses Blog Tutorials Interview Questions
+2 votes
in DevOps and Agile by (29.3k points)

I've been looking at the markdown syntax used in GitHub for a while but except resizing an image to the extent of the page, I can't figure out how to center an image in it.

Is it possible? If it is, how?

1 Answer

+2 votes
by (19.4k points)
edited by

Markdown doesn't care with positioning so i don't think that completely relying on markdown is not a good idea. Some markdown processors support inclusion of HTML, and in the GitHub case you may fallback to something like 

<div style="text-align:center"><img src="..." /></div>

 Beware that there's no guarantee the image will be centered if your repository is forked in a different hosting environment (Codeplex, BitBucket, ...) or if the document isn't read through a browser.

Note: Keep in mind that even within the GitHub website, the way markdown is rendered is not uniform.

For more information about installation of git and common git commands please go through the following link:


Browse Categories