markdown

Markdown examples

Markdown support

Markdig is used as the Markdown processor and the following markdown features are enabled by default:

Tables

How to create the following table with styling, using pipe tables and generic attributes.

Company Contact Country
Alfreds Futterkiste Maria Anders Germany
Centro comercial Moctezuma Francisco Chang Mexico
Ernst Handel Roland Mendel Austria
Island Trading Helen Bennett UK
{.table .table-striped}
|Company|Contact|Country|
|-|-|-|
|Alfreds Futterkiste|Maria Anders|Germany|
|Centro comercial Moctezuma|Francisco Chang|Mexico|
|Ernst Handel|Roland Mendel|Austria|
|Island Trading|Helen Bennett|UK|

Using CSS

How to create the following blockquote with an bootstrap info-alert style, using generic attributes.

Normally the dangers inherent in the diverse hardware environment enhances the efficiency of the inductive associative dichotomy on a strictly limited basis.

{.alert .alert-info}
> Normally the dangers inherent in the diverse hardware environment enhances the efficiency of the inductive associative dichotomy on a strictly limited basis.

Resize Image

Resizing image is supported by Markdig, using below attribute syntax to resize an image.

![](http://example.com/image.jpg){width=250 height=120}

How to let SimpleMDE support superscript and subscript?

SimpleMDE doesn't support superscript and subscript. there are two ways to show sub/superscript.

Use html tags:

H<sub>2</sub>O
E =mc<sup>2</sup>

H2O

E =mc2

Use ~ and ^

H~2~O
E =mc^2^

H2O

E =mc2

SimpleMDE previews are rendered by Marked using GitHub Flavored Markdown. While Marked doesn't support using ~ and ^ mark sub/superscript. so when preview it by SimpleMDE, it will show the original code:

H~2~O
E =mc^2^

But Markdig can convert ~ and ^ to sub/superscript. so can see the sub/superscript on the blog page. because on the blog page, the content was generated by Markdig.