#Understanding about Markdown(.md)file & How to Write

#Understanding about Markdown(.md)file & How to Write

What is an MD file & Why do we use it?

  • MD files are the extensions of files created by Markdown language software. Markdown is a lightweight markup language intended for one purpose, to be used to format text on the web with plain text formatting syntax.
  • MD files are a convenient way of archiving and comparing different versions of source code because it's easier to compare content and identify changes in a markup language compared to in a binary format. It's also easier to convert the files to HTML.

Heading

For Writing headings, add one to six # symbols before your heading text. The number of # you use will determine the size of the heading.

For Example :

# Heading 1  /*The largest heading */
## Heading 2 /* The Second largest heading */
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6 /* Smallest heading */

The rendered output

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Paragraphs

To create paragraphs, use a blank line to separate one or more lines of text.If we want to write normal text then write simple text here, no need to add any tags.

For Example:

Paragraph 1
Paragraph 2
Paragraph 3

The rendered output

Paragraph 1 Paragraph 2 Paragraph 3

Emphasis

You can add emphasis by making text italic or bold.

italics

To italicize text, add one asterisk or underscore before and after a word or phrase. To italicize the middle of a word for emphasis, add one asterisk without spaces around the letters.

For Example:

*text*
_text_

The rendered output

text text

Bold

Use two Asterisks to wrap the text you want to make bold and also you can use underscores in place of asterisks

For Example:

**text**
__text__

The rendered output

text text

Bold & Italics

You can make your text simultaneously bold and italic by using three asterisks or three underscores

For Example:

***text***
___text___

The rendered output

text text

Strikethrough

For Writing mistaken text, add two ~ symbols before and after a word.

For Example:

~~text~~

The rendered output

text

Quoting text

If you want to write a quote you can add the > symbol at the beginning. For Example:

> blockquote text
> example text

The rendered output

blockquote text example text

If you want to write a nested quote you can add the >> symbol at the beginning. For Example:

>> blockquote text
>> example text

The rendered output

blockquote text

nested blockquote text example text

Lists

You can organize items into ordered and unordered lists.

Ordered Lists

In markdown, it doesn't matter which no. you use to format your list, as list always render as 1,2,3 and so on. The numbers don’t have to be in numerical order, but the list should start with the number one.

For Example:

1. Ordered Lists Text
2. Ordered Lists Text
3. Ordered Lists Text

The rendered output

  1. Ordered Lists Text
  2. Ordered Lists Text
  3. Ordered Lists Text

Unordered lists

In an unordered list, each item on your list is preceded by a bullet point. markdown allows you to format your list with different symbols: asterisks *, hyphens - or plus signs +.

For Example:

- Unordered Lists Text
- Unordered Lists Text
- Unordered Lists Text

The rendered output

  • Unordered Lists Text
  • Unordered Lists Text
  • Unordered Lists Text

Code

We can write to a word or phrase as code, and enclose it in backticks (`).

Code Blocks

To create code blocks, use the three backticks before and after the code.

For Example:

 /*```Code Text```*/

The rendered output

for (let i = 0; i < car.length; i++) {
  text += car[i] + "<br>";
}

Horizontal Rules

Add three --- hyphens or blank lines before and after horizontal rules.

For Example:

Demo Text
---

The rendered output

Demo Text


URLs and Email Addresses

To quickly turn a URL or email address into a link, enclose it in angle brackets another way to write the link is The label, in brackets, followed immediately by a colon and at least one space, and The URL for the link, which you can optionally enclose in angle brackets. and The optional title for the link, which you can enclose in double quotes and parenthesis

For Example:

<https://www.markdownguide.org>

[Name](https://www.google.com/ "Google")

The rendered output

https://www.markdownguide.org

Images

To add an image, add an exclamation mark (!), followed by alt text in brackets, and the path or URL to the image asset in parentheses. You can optionally add a title in quotation marks after the path or URL.

For Example:

![Alt text ](./link/adress/image.jpg "Link Title" )

Table Format

To Create a table first the heading of the table used the pipe | symbol before and after the table heading text and after separating the thead and tbody using the pipe and minus symbol. and after that tbody created as thead .

For Example:

| Table 1 | Table 2 | Table 3 |
| ------- | ------- | ------- |
| 1       | 2       | 3       |
| 1       | 2       | 3       |

The rendered output

Table 1Table 2Table 3
123
123

Did you find this article valuable?

Support Saurabh Mehare by becoming a sponsor. Any amount is appreciated!