Jagrut Sharma

Help with Markdown

Written by: Jagrut Sharma

Have you ever visited any GitHub repository and found a project that you think is cool and want to make something like that or make it better. You would have noticed that there is a “README.md” file included that explains how the project works and what its features are in details. This “.md” file is known as markdown. It is a simple text format that is converted to HTML, without the need for writing tags. It is used in blogs, forums, readme file.

It is used where we don't need the full features of html like class, id, other attributes but just want the formatting. Main emphasis is given to readability. Here are some of the tips that would help you in writing a markdown.

Fun fact: Even Wikipedia uses a specialised markdown that they call as wikitext.

1. Heading

The “#” keyword is used for defining a heading in markdown. There are six headings available that are defined based on number of “#” written before text.

2. Formatting Text

Formatting text is something that is often required in anything that we write. Making text bold, italic among other things. To make text bold you need to add “**” or underscore two times(“__” ) to prefix and suffix of text. To make text italic, you need to add “*” or “_” to prefix and suffix. Similarly for a strikethrough text, you need to add “~~”. To enter a line, you need to enter hyphen or underscore three times “---” or “___””.

3. Links and Images

To enter a hyperlink, you can use the format [Text] (Link). When you click on the text, it takes you to the link. Other format you can use is [Text] (Link "Title"), the title element is displayed while hovering.

For images the format to be used is, “ ![Text](Link of image)”.

4. Bullet Points

For writing bullet points, you just need to add “*” before an item. If you add a tab and then add “*”, it will automatically become a nested bullet point.

5. Code Block/Quote

Writing a code block or quote can be used many times in your document. For a code block, you need to write the code between a block of ``` (backtick). Also, you can write the name of the language after the opening of backtick block. This command is git hub specific.

For entering a quote, you just need to begin the sentence with “>” sign.

That's it. These are some of the basic syntax of markdown. That will help you a lot in writing and maintaining proper documentation. To learn more you can visit this source