Upload
venkatesh-narayanan
View
152
Download
0
Embed Size (px)
Citation preview
Markdown – An
IntroductionA brief introductory tutorial on Markdown. Markdown is a plain textformat for writing structured documents, based on conventions used forindicating formatting in email and usenet posts. It is a light weight and easyto use syntax for styling.
@VenkiNarayanan
What is Markdown?
• Markdown is a way to style text on the web.
• It helps you to control the display of the document by formatting words as
bold or italic etc.
• Markdown is just a regular text with few non-alphabetic characters thrown
in.
• Markdown text can be converted to HTML and other formats.
Styling Text
*This text will be Bold*
**This text will be Italic**
This text will be Bold
This text will be Italic
In the above example we are
marking text as italic using **
and bold using *
• Use “*” or “-” to mark text as italic.
• Use “**” to mark text as bold.
• Use “~~” to strikethrough text.
Ordered Lists
• You define ordered lists in Markdown by prefixing the number.
• To define a sub list within the main list, then start sub list by putting two
spaces.
1. Item 1
2. Item 2
3. Item 3
1. Item 1
2. Item 2
1. Sub item 1
2. Sub item 2
Unordered Lists
• For unordered bulleted lists, start the line with star “*” or dash “-”.
• To define a sub list within the main list, then start sub list by putting two
spaces, similar to ordered lists..
* Item 1
* Item 2
* Item 3
• Item 1
• Item 2
• Item 3
Links and Images
• You can insert images using the following format: ![Alt Text](url)
• Example: ![Image of
Yaktocat](https://octodex.github.com/images/yaktocat.png)
• You can insert links using the following format: [Alt Text](url)
Reference Links
• Reference link refers to another place in the document.
• Advantage of reference link is that multiple links to the same place only need to be updated once.
• Reference link is defined by providing the same tag name wrapped in brackets, followed by a colon, followed by the link.
• In above example, all references to [a fun place] would be replaced by the link www.zombo.com
• Same approach can also be used for Reference images by adding the exclamation mark
Do you want to [see something fun][a fun place]?
[a fun place]: www.zombo.com
Do you want to see something fun?
Headers
• Sometimes it is useful to have different levels of headings to structure your documents.
• Start lines with “#” to create headings.
• Multiple “#” denotes different heading levels.
• It is possible to have up to six different heading sizes.
### Third Level Heading Third Level Heading
Block Quotes
• If you like to call special attention to a quote from another source, use the
“>” character before the line.
> Cofee. The finest organic suspension ever devised…I beat the borg
with it.
> - Captain Janeway
Inline Code
• You can style inline code with Markdown.
• If you have inline code blocks, wrap them in backthicks:
‘var example = true` var example = true;
• You can define multi line code blocks. Use triple backticks “```” to format
text as own distinct block.
Github flavored Markdown
• There is a Github flavored Markdown which provides more markdown
options.
• More details here - https://help.github.com/articles/github-flavored-
markdown/
References
• Markdown Tutorial - http://markdowntutorial.com/
• Markdown - http://daringfireball.net/projects/markdown/
• Mastering Markdown - https://guides.github.com/features/mastering-
markdown/