11 Tricks | Learn Markdown like a PRO
What is Markdown?
Markdown is a lightweight markup language for creating formatted text using a plain-text editor. Markdown is extensively used for creating readme files and in the API documentation.
The way of thinking behind Markdown is that plain content should be crisp and clear without the taggings muddling everything up. However, there should still be text modifiers present such as italics, bolds, etc.
Why use Markdown?
Recently Markdown is getting popular and has become a go-to language in API documentation because of its simplicity. With growing API documentation Markdown has been used extensively for creating documentation for the following reasons:
Markdown is easy to write and no complicated syntax.
Markdown can be easily converted into HTML.
Markdown can be viewed with a text editor as well as with the browser.
Where it is used?
Since Markdown is easy to read, write, and publish, markdown popularity has been growing ever since it has been introduced. Following are the places where Markdown is used:
Markdown is a standard for open source site- GitHub for writing the readme files.
Tools such as Swagger, RAML, ReadMe.io, and Apiary.io uses Markdown to publish HTML files for the API documentation.
Markdown is used in different flavors on Skype, Slack, and Facebook Messenger.
Here are the 10 tips which we have compiled for you understand markdown syntax and become a pro user:
Using Headings
Add number signs (#) in front of a sentence to create headings. The number of “#” determines the heading level.
NOTE: You must add a space between “#” and the starting word of the sentence.
Using Paragraphs
You should use a blank line to separate one or more lines of text. The new lines create a new paragraph.
NOTE: Do not indent paragraphs with spaces or tabs unless there is a specific need for it.
Using Italics text
Add one asterisk before and after a word or phrase to italicize.
NOTE: You can also use an underscore instead of an asterisk. However, it is not a good practice to use underscore.
Using Bold text
Add two asterisk before and after a word or phrase to italicize.
NOTE: You can also use two underscores instead of asterisks. However, it is not a good practice to use underscores.
Using Bold and Italics text
Add three asterisk before and after a word or phrase to italicize.
NOTE: You can also use three underscore instead of asterisks. However, it is not a good practice to use underscores.
Using a Numbered list (Ordered list)
Add line items with numbers followed by periods for example 1.
Do not use 1) or 1). Or >1.
The numbers don’t have to be in numerical order, however, the list should always start with the number one.
Using a bulleted list (Un-ordered list)
Add line items with asterisks (*) or plus (+) or an underscore (_).
You should choose any one of three and use them consistently across your full content.
Using code blocks
When you need to cite a block of code or a phrase, then you must indent four spaces of a tab before the lines of code. When the lines of code is inside a list, use two tabs or eight spaces.
Markdown
1. Open the file.
2. Find the following code block on line 21:
<html>
<head>
<title>Test</title>
</head>
3. Update the title to match the name of your website.
Output
Using links
To create links, you should use the following syntax:
[Link text which appears](Link url)
Markdown
I love [Facebook](https://www.facebook.com/).
Output
I love Facebook.
Using images
To add images, you should use the following syntax:
![Alterntate text goes here](image URL patch)
Using tables
To create tables you need to use the pipe (|) and hyphen (-) characters.
To define the columns you must use “|” and define the header row by using hyphens.
Markdown
| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |
Output
Conclusion
Markdown is a lightweight markup language that is easy to write and read. It can be converted directly into HTML that makes it very easy to publish on the web. There is several application that uses Markdown.
Some of the web application like GitHub defines “.md” files as the standard to document the readme files. There are also various other application that uses different flavors of this language.
If you found this article helpful, please share it.
Thanks for reading it.
Cheers 🍻
0 Comments