Markdown is a lightweight markup language for creating formatted text using a plain-text editor. Markdown is widely used in blogging, instant messaging, online forums, collaborative software,documentation pages, and readme files.
To create a heading, add one to six #
symbols before your heading text. The number of #
you use will determine the size of the heading.
#
The largest heading
##
The second largest heading
######
The smallest heading
Markdown applications don’t agree on how to handle a missing space between the number signs (#) and the heading name. For compatibility, always put a space between the number signs and the heading name.
You can indicate emphasis with bold, italic, strikethrough, subscript, or superscript text in comment fields and .md
files.
Style | Syntax | Keyboard shortcut | Example | Output |
---|---|---|---|---|
Bold | ** ** or __ __ | Command+B (Mac) or Ctrl+B (Windows/Linux) | This is bold text | This is bold text |
Italic | * * or _ _ | Command+I (Mac) or Ctrl+I (Windows/Linux) | This text is italicized | This text is italicized |
Strikethrough | ~~ ~~ | This was mistaken text | ||
Bold and nested italic | ** ** and _ _ | This text is extremely important | This text is extremely important | |
All bold and italic | *** *** | All this text is important | All this text is important |
You can call out code or a command within a sentence with single backticks. The text within the backticks will not be formatted.
Use `git status` to list all new or modified files that haven't yet been committed.
Use git status
to list all new or modified files that haven't yet been committed.
`
To format code or text into its own distinct block, use triple backticks.
Some basic Git commands are:
git status
git add
git commit
You can create an inline link by wrapping link text in brackets [ ], and then wrapping the URL in parentheses ( ).
eg: Consult [patsicko wiki on github for Markdown guide](https://github.com/patsicko/markdown-guide/wiki)
output:
Consult patsicko wiki on github for Markdown guide
You can display an image by adding !
and wrapping the alt text in [ ]
. Then wrap the link for the image in parentheses ()
.
Here is an example
![Patrick](https://pbs.twimg.com/media/FK-7LxOXMAArWL-.jpg)
You can organize items into ordered and unordered lists.
Ordered Lists To create an ordered list, add line items with numbers followed by periods. The numbers don’t have to be in numerical order, but the list should start with the number one. eg:
Markdown
- First item
- Second item
- Third item
- Fourth item`
output
- First item
- Second item
- Third item
- Fourth item
To create an unordered list, add dashes (-)
, asterisks (*)
, or plus signs (+)
in front of line items. Indent one or more items to create a nested list.
git status git add git commit
To quickly turn a URL or email address into a link, enclose it in angle brackets. Eg:
<https://github.com/patsicko/markdown-guide/wiki>