Markdown Syntax
All Syntax can be found here . It would take a lot of effort to describe syntax in text (they will be formatted) so please consider this table below for the whole basics syntax.
Format | Syntax | Example |
Italic | *Text* | This is italic |
Bold | **Bold** | This is bold |
Inline links | [Description text](url here) | A link |
Images | ![Caption](url to img) | An image |
Link+images | [![Caption](url to img)](url to a page)] | Click me |
Footnotes | I have more [1] to say. [1]: say it down here. | <a href=“#section1”>Hey,Please read the note below this table. |
Line breaks | Double space + enter | |
Unordered Lists | * Item1 *Item 2 | <ul><li>item1</li><li>item2</li><li>item3</li><li>item4</li></ul> |
Ordered Lists | 1. Item a 2. Item b | <ol><li>itema</li><li>itemb</li><li>itemc</li><li>itemd</li></ol> |
Mixed Lists | 1. Item 1 * item 1a | <ol><li>itema</li></ol><ul><li> item1</li></ul> |
Block quote | > Quoted text | <blockquote>Stay Hungry Stay Foolish</blockquote> |
Preformatted | Begin each line with,two spaces or more to,make text look,e x a c t l y,like,you,type i,t. | Begin each line with,two spaces or more to,make text look,e x a c t l y,like,you,type i,t. |
Code | `Insert Code` | cout<<"Hello world"; |
Code block/ Syntax highlighting | ```insert code``` | <a href=“#section1”>Hey,Please read the note below this table. |
Headers | #, ##, ###, ####, #####, ###### (from h1 to h6) | This is a h3 header |
Strike through | ~Insert text here~~ | I am dead |
Tables | | Tables | Are | Cool | |---——-|:---———-:|——:| | col 1 is| left-aligned | $1600 | | |
Footnotes | Footnote[^1] <br> [^1]: Text reference | Here is a simple footnote[1]. With some additional text after it. |
[1]: My footnote reference.
Note: The examples may be wrong because it’s written in HTML, just skip them.
These characteristics are dependent upon each markdown flavour.
Useful notes :
Markdown allows you to use backslash escapes to generate literal characters which
would otherwise have special meaning in Markdown’s formatting syntax. One commonly used backslash escape character is : \
So? \*This\* isnt italic anymore but is surrounded by literal asterisks.
You can use <br/> tag to force line break.
Double space then enter if you want to make a new line if there is trouble making new lines.
Seeing is not as good as practicing. You can either create a markdown file for yourself to practice or do it online here.
Footnotes and syntax highlighting are not part of the original markdown and are only supported by certain flavors of markdown (Feedback from Sean Brody)
Any URL (like http://www.github.com/) will be automatically converted into a clickable link.
Markdown table support is designed to handle most tables for most people; it doesn’t cover all tables for all people. If you need complex tables you will need to create them by hand or with a tool specifically designed for your output format.
Using code block syntax with diff language to generate colored text. There are still some limitations such as can not style the text inside and few colors. This can be applicable when you want to highlight some note or to show difference between two code block
- text in red
+ text in green
! text in orange
# text in gray
@@ text in purple (and bold)@@
- Class diagram
classDiagram
class Duck{
-weight
+swim()
+quack()
}
- Sequence diagram
sequenceDiagram
participant dotcom
participant iframe
dotcom->>iframe: loads html w/ iframe url
- Flowchart
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
Author: Vo Tran Thanh Luong. Also, I would like to thank all the contributors/translators for your work making this greater.