Raw HTML
Markdown allows you to insert raw HTML (or DocBook) anywhere in a document (except verbatim contexts, where <
, >
, and &
are interpreted literally).
The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous, DZSlides, EPUB, Markdown, and Textile output, and suppressed in other formats.
Pandoc extension.
Standard markdown allows you to include HTML “blocks”: blocks of HTML between balanced tags that are separated from the surrounding text with blank lines, and start and end at the left margin. Within these blocks, everything is interpreted as HTML, not markdown; so (for example), *
does not signify emphasis.
Pandoc behaves this way when --strict
is specified; but by default, pandoc interprets material between HTML block tags as markdown. Thus, for example, Pandoc will turn
<table>
<tr>
<td>*one*</td>
<td>[a link](http://google.com)</td>
</tr>
</table>
into
<table>
<tr>
<td><em>one</em></td>
<td><a href="http://google.com">a link</a></td>
</tr>
</table>
whereas Markdown.pl
will preserve it as is.
There is one exception to this rule: text between <script>
and <style>
tags is not interpreted as markdown.
This departure from standard markdown should make it easier to mix markdown with HTML block elements. For example, one can surround a block of markdown text with <div>
tags without preventing it from being interpreted as markdown.