Following are some examples of markdown syntax.
1. URL
use “[text to display]” and “(href)” to customize the url link, such as Markdown Doc.
2. Strong Text
put “**” besides the text to make it to be strong, such as Strong Text.
3. Code Snippet
put “ ` “ besides the text that to be treated as code snippet, such as int a = 3;
4. horizontal line
put more than 3 “ - “ to make a horizontal line, such as “---”.
5. List
use “*” and space to make lists, such as
- item 1
- item 2 list inside another list could be achieved by three space.
- list 1
- list 2
- list 3
- list 2
6. Code blocks, support language highlight
use “ ```language “ as beginning line and “```” as end line to make coding blocks, such as following java code block.
import java.util.*;
class Solution {
public static void main(Sting[] args) {
List<Integer> res = new ArrayList<>();
for(int i = 0; i < 10; i++) res.add(i);
}
}
if the code is HTML then use jekyll highlight syntax.
7. insert web page
use “iframe” tag to insert a web page into markdown file, such as markdown doc page.
8. insert a quote
use “>” to quote, such as
some quote
9. insert an image
use “![alt](image src “title”) to inset an image, such as
10. inset a table
use
header | header | header
:-:|:-:|:-:|
content | content | content
such as
header 1 | header 2 | header 3 |
---|---|---|
1 | 2 | 3 |