Learning MarkDown

Markdown is a simple way to format text that looks great on any device. It doesn’t do anything fancy like change the font size, color, or type — just the essentials, using keyboard symbols you already know.

1. CommonMark


2. Table


3. Extended Syntax


4. Foot Notes


    Here is a footnote reference,[^1] and another.[^longnote]
    This is another reference to [^1]
    [^1]: Here is the footnote.

    And another reference to [^longnote]
    [^longnote]: Here's one with multiple blocks.
        Subsequent paragraphs are indented to show that they belong to the previous footnote.
    > This is a block quote
    > Inside a footnote
        { some.code }
    The whole paragraph can be indented, or just the first
    line.  In this way, multi-paragraph footnotes work like
    multi-paragraph list items.

Here is a footnote reference,[^1] and another.[^longnote] This is another reference to [^1] [^1]: Here is the footnote.

And another reference to [^longnote]

[^longnote]: Here's one with multiple blocks. Subsequent paragraphs are indented to show that they belong to the previous footnote. > This is a block quote > Inside a footnote The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.

5. Task List


Markdown

  - [ ] Item1 
  - [x] Item2 
  - [ ] Item3 
  - [ ] Item4 

Html

    <ul class="contains-task-list">
        <li class="task-list-item"><input disabled="disabled" type="checkbox" /> Item1</li>
        <li class="task-list-item"><input disabled="disabled" type="checkbox" checked="checked" /> Item2</li>
        <li class="task-list-item"><input disabled="disabled" type="checkbox" /> Item3</li>
        <li class="task-list-item"><input disabled="disabled" type="checkbox" /> Item4</li>
    </ul>

6. Generic Attributes of html elements


Attributes can be attached to:

{#fenced-id .fenced-class .dark-style}
~~~
This is a fenced with attached attributes
~~~ 

produce:

<pre><code id="fenced-id" class="fenced-class dark-style">This is a fenced with attached attributes
</code></pre>

Attributes can be of 3 kinds:

7. Graph with mermaid


a. Flow chart


   ```mermaid
   	graph TD
   	A[Client] --> B[Load Balancer]
   	B --> C[Server1]
   	B --> D[Server2]
    ```
produce:
graph TD; A[Client] --> B[Load Balancer]; B --> C[Server1]; B --> D[Server2];

And here is another:


   ```mermaid
      graph TD;
         A[User Department] -->|Submit Document| B(Accounting);
         B --> C{Check Budget};
         C -->|Have Budget| D[Approve];
         C -->|No Budget| E[Reject];
         E -->| Inform User Department| A
   ```
produce:
graph TD; A[User Department] -->|Submit Document| B(Accounting); B --> C{Check Budget}; C -->|Have Budget| D[Approve]; C -->|No Budget| E[Reject]; E -->| Inform User Department| A

b. Sequence Diagram

   
   ```mermaid	
       **sequenceDiagram**
   	Alice->>John: Hello John, how are you?
   	loop Healthcheck
   	    John->>John: Fight against corona virus
   	end
   	Note right of John: Rational thoughts!
   	John-->>Alice: Great!
   	John->>Bob: How about you?
   	Bob-->>John: Jolly good!
     ```

produce :

sequenceDiagram Alice->>John: Hello John, how are you? loop Healthcheck John->>John: Fight against corona virus end Note right of John: Rational thoughts! John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good!

c. Gantt Diagram

gantt
   title A Gantt Diagram
   dateFormat  YYYY-MM-DD
   section Section
   A task           :a1, 2014-01-01, 30d
   Another task     :after a1  , 20d
   section Another
   Task in sec      :2014-01-12  , 12d
   another task      : 24d
gantt title A Gantt Diagram dateFormat YYYY-MM-DD section Section A task :a1, 2014-01-01, 30d Another task :after a1 , 20d section Another Task in sec :2014-01-12 , 12d another task : 24d

d. Pie Chart


```mermaid
    pie
    title Key elements in Product X
    "Calcium" : 42.96
    "Potassium" : 50.05
    "Magnesium" : 10.01
    "Iron" :  5
```
pie title Key elements in Product X "Calcium" : 42.96 "Potassium" : 50.05 "Magnesium" : 10.01 "Iron" : 5