Markdown Syntax Examples. The examples will be broken up in to two different sections, block elements and span elements. Block elements are those that take up their own line, like paragraphs, code, or headers. The span elements can be used inline, meaning they can be used within a paragraph and don't need to be on a line of their own. Markdown is not a replacement for HTML, or even close to it. (John Gruber) As explained by John Gruber, the creator of markdown, it was not created to replace HTML, so there are situations we can't avoid using HTML. With complex tables, that's the case. Markdown-it demo. Html xhtmlOut breaks linkify typographer highlight CommonMark strict clear permalink html source debug. Fork me on GitHub.
Paragraphs are separated by a blank line.
2nd paragraph. Italic, bold, and
monospace
. Itemized listslook like:- this one
- that one
- the other one
Note that --- not considering the asterisk --- the actual textcontent starts at 4-columns in.
Block quotes arewritten like so.
They can span multiple paragraphs,if you like.
Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., 'it's allin chapters 12--14'). Three dots .. will be converted to an ellipsis.Unicode is supported. ☺
An h2 header
Here's a numbered list:
Markdown Italics
- first item
- second item
- third item
Note again how the actual text starts at 4 columns in (4 charactersfrom the left side). Here's a code sample: Mathtype 7 4 3.
As you probably guessed, indented 4 spaces. By the way, instead ofindenting the block, you can use delimited blocks, if you like:
(which makes copying & pasting easier). You can optionally mark thedelimited block for Pandoc to syntax highlight it:
An h3 header
Markdown Examples Html
Now a nested list:
- First, get these ingredients:
- carrots
- celery
- lentils
- Boil some water.
- Dump everything in the pot and followthis algorithm:Do not bump wooden spoon or it will fall.
![Markdown Example Markdown Example](https://doc.qt.io/qt-5/images/markdowneditor-example.png)
Notice again how text always lines up on 4-space indents (includingthat last line which continues item 3 above).
Here's a link to a website, to a localdoc, and to a section heading in the currentdoc. Here's a footnote [^1].
[^1]: Footnote text goes here.
Tables can look like this:
Markdown Examples Html
size material color Unrar sharp 1 2.
9 leather brown10 hemp canvas natural11 glass transparent
Table: Shoes, their sizes, and what they're made of
(The above is the caption for the table.) Pandoc also supportsmulti-line tables:
Markdown Example Files
keyword text
red Sunsets, apples, andother red or reddishthings.
green Leaves, grass, frogsand other things it'snot easy being.
A horizontal rule follows.
Here's a definition list:
apples: Good for making applesauce.oranges: Citrus!tomatoes: There's no 'e' in tomatoe.
Again, text is indented 4 spaces. (Put a blank line between eachterm/definition pair to spread things out more.)
Here's a 'line block':
| Line one| Line too| Line tree
and images can be specified like so:
Inline math equations go in like so: $omega = dphi / dt$. Displaymath should get its own line and be put in in double-dollarsigns:
$$I = int rho R^{2} dV$$
And note that you can backslash-escape any punctuation characterswhich you wish to be displayed literally, ex.: `foo`, *bar*, etc.