Markdown Tutorial
Markdown Tutorial
Although mature XML-based book standards such as DocBook have robust consistency for interoperability between publishing systems, Markdown has no official standards. Each project has its own way of creating and extending Markdown for their own purposes and different build tools frequently only support whatever standards they like. As a result, there is very little consistency between Markdown systems. Markdown standards are also frequently extended by different projects to support their specific needs.
Headers
Headers in Markdown are created using the hash symbol (#). The number of hash symbols indicates the level of the header.
1 2 3 4 5 6 |
|
Lists
Markdown supports both unnumbered (bullet) lists and numbered (ordered) lists.
Unnumbered Lists
Unnumbered lists can be created using asterisks (*), plus signs (+), or hyphens (-).
1 2 3 4 5 6 7 8 9 10 11 |
|
Numbered Lists
Numbered lists are created using numbers followed by periods.
1 2 3 4 5 |
|
Note: The actual numbers don't matter in Markdown source - they will be automatically numbered in the rendered output.
1 2 3 |
|
This will still render as 1, 2, 3.
Images
Images can be inserted with an exclamation mark, followed by alt text in brackets, and the image URL in parentheses.
1 2 3 |
|
For more control, MkDocs Material supports additional attributes:
1 |
|
Links
Links are created using square brackets for the link text followed by the URL in parentheses.
1 2 3 4 5 6 7 |
|
For internal links in MkDocs:
1 2 3 |
|
Admonitions
MkDocs Material extends Markdown with admonitions for highlighted content. These require the admonition
and pymdownx.details
extensions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Code
Inline code is wrapped with backticks.
1 |
|
Code blocks use triple backticks, optionally followed by the language name for syntax highlighting.
1 2 3 |
|
1 2 3 4 5 6 7 8 |
|
1 2 3 4 5 6 7 8 |
|
Block equations:
1 2 3 |
|
For more complex equations with multi-line alignment:
1 2 3 4 5 6 |
|