Markdown सिंटैक्स गाइड

अपने दस्तावेज़ फॉर्मैट करने के लिए आवश्यक सिंटैक्स

अवलोकन

Markdown एक हल्की मार्कअप भाषा है जिसका उपयोग आप प्लेनटेक्स्ट टेक्स्ट दस्तावेज़ों में फॉर्मैटिंग एलिमेंट जोड़ने के लिए कर सकते हैं। 2004 में John Gruber द्वारा बनाया गया, Markdown अब दुनिया की सबसे लोकप्रिय मार्कअप भाषाओं में से एक है।

Markdown का उपयोग WYSIWYG एडिटर के उपयोग से अलग है। Microsoft Word जैसे ऐप में आप शब्दों और वाक्यांशों को फॉर्मैट करने के लिए बटन क्लिक करते हैं और बदलाव तुरंत दिखते हैं। Markdown ऐसा नहीं है। जब आप Markdown-फॉर्मैट वाली फ़ाइल बनाते हैं, तो आप टेक्स्ट में Markdown सिंटैक्स जोड़ते हैं ताकि इंगित करें कि कौन से शब्द और वाक्यांश अलग दिखने चाहिए।

हैडिंग

हैडिंग बनाने के लिए शब्द या वाक्यांश के सामने नंबर साइन (#) जोड़ें। जितने नंबर साइन आप इस्तेमाल करते हैं वह हैडिंग लेवल से मेल खाना चाहिए। उदाहरण के लिए लेवल तीन की हैडिंग के लिए तीन नंबर साइन इस्तेमाल करें (जैसे ### मेरी हैडिंग)।

मार्कडाउन
HTML (एचटीएमएल)
रेंडर आउटपुट
# Heading level 1
<h1>Heading level 1</h1>

Heading level 1

## Heading level 2
<h2>Heading level 2</h2>

Heading level 2

### Heading level 3
<h3>Heading level 3</h3>

Heading level 3

#### Heading level 4
<h4>Heading level 4</h4>

Heading level 4

##### Heading level 5
<h5>Heading level 5</h5>
Heading level 5
###### Heading level 6
<h6>Heading level 6</h6>
Heading level 6

पैराग्राफ

पैराग्राफ बनाने के लिए एक या अधिक टेक्स्ट लाइनों को अलग करने के लिए खाली लाइन इस्तेमाल करें।

मार्कडाउन
HTML (एचटीएमएल)
रेंडर आउटपुट
I really like using Markdown.

It lets me write easily.
<p>I really like using Markdown.</p>
<p>It lets me write easily.</p>

I really like using Markdown.

It lets me write easily.

लाइन ब्रेक

लाइन ब्रेक या नई लाइन बनाने के लिए लाइन को दो या अधिक स्पेस से खत्म करें और फिर रिटर्न दबाएं।

मार्कडाउन
HTML (एचटीएमएल)
रेंडर आउटपुट
This is the first line.
And this is the second line.
<p>This is the first line.<br>
And this is the second line.</p>

This is the first line.
And this is the second line.

जोर

आप टेक्स्ट को बोल्ड या इटैलिक बनाकर जोर दे सकते हैं।

बोल्ड

बोल्ड टेक्स्ट के लिए शब्द या वाक्यांश के पहले और बाद में दो एस्टेरिस्क (**) या अंडरस्कोर (__) जोड़ें।

मार्कडाउन
HTML (एचटीएमएल)
रेंडर आउटपुट
I just love **bold text**.
I just love <strong>bold text</strong>.

I just love bold text.

I just love __bold text__.
I just love <strong>bold text</strong>.

I just love bold text.

इटैलिक

इटैलिक टेक्स्ट के लिए शब्द या वाक्यांश के पहले और बाद में एक एस्टेरिस्क (*) या अंडरस्कोर (_) जोड़ें।

मार्कडाउन
HTML (एचटीएमएल)
रेंडर आउटपुट
The *cat* meows.
The <em>cat</em> meows.

The cat meows.

The _cat_ meows.
The <em>cat</em> meows.

The cat meows.

बोल्ड और इटैलिक

एक साथ बोल्ड और इटैलिक के साथ जोर देने के लिए शब्द या वाक्यांश के पहले और बाद में तीन एस्टेरिस्क (***) या अंडरस्कोर (___) जोड़ें।

मार्कडाउन
HTML (एचटीएमएल)
रेंडर आउटपुट
This text is ***really important***.
This text is <strong><em>really important</em></strong>.

This text is really important.

This text is ___really important___.
This text is <strong><em>really important</em></strong>.

This text is really important.

ब्लॉककोट

ब्लॉककोट बनाने के लिए पैराग्राफ के सामने > जोड़ें।

मार्कडाउन
HTML (एचटीएमएल)
रेंडर आउटपुट
> Dorothy followed her through many of the beautiful rooms in her castle.
<blockquote><p>Dorothy followed her through many of the beautiful rooms in her castle.</p></blockquote>

Dorothy followed her through many of the beautiful rooms in her castle.

नेस्टेड ब्लॉककोट

ब्लॉककोट नेस्ट किए जा सकते हैं। जिस पैराग्राफ को नेस्ट करना है उसके सामने >> जोड़ें।

मार्कडाउन
रेंडर आउटपुट
> Dorothy followed her through many of the beautiful rooms in her castle.
>
>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.

Dorothy followed her through many of the beautiful rooms in her castle.

The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.

सूची

आप आइटम को क्रमांकित और अक्रमित सूचियों में व्यवस्थित कर सकते हैं।

क्रमांकित सूची

क्रमांकित सूची बनाने के लिए नंबर और उसके बाद पीरियड वाली लाइन आइटम जोड़ें। नंबर क्रम में होने ज़रूरी नहीं, लेकिन सूची एक से शुरू होनी चाहिए।

मार्कडाउन
HTML (एचटीएमएल)
रेंडर आउटपुट
1. First item
2. Second item
3. Third item
4. Fourth item
<ol>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item</li>
  <li>Fourth item</li>
</ol>
  1. First item
  2. Second item
  3. Third item
  4. Fourth item

अक्रमित सूची

अक्रमित सूची बनाने के लिए लाइन आइटम के सामने डैश (-), एस्टेरिस्क (*) या प्लस साइन (+) जोड़ें।

मार्कडाउन
HTML (एचटीएमएल)
रेंडर आउटपुट
- First item
- Second item
- Third item
- Fourth item
<ul>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item</li>
  <li>Fourth item</li>
</ul>
  • First item
  • Second item
  • Third item
  • Fourth item

कोड

किसी शब्द या वाक्यांश को कोड के रूप में दर्शाने के लिए उसे बैकटिक (`) में रखें।

मार्कडाउन
HTML (एचटीएमएल)
रेंडर आउटपुट
At the command prompt, type `nano`.
At the command prompt, type <code>nano</code>.

At the command prompt, type nano.

कोड ब्लॉक

कोड ब्लॉक बनाने के लिए ब्लॉक की हर लाइन को कम से कम चार स्पेस या एक टैब से इंडेंट करें, या कोड ब्लॉक के पहले और बाद में तीन बैकटिक (```) इस्तेमाल करें।

मार्कडाउन
रेंडर आउटपुट
```
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}
```
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}

हॉरिजॉन्टल रूल

हॉरिजॉन्टल रूल बनाने के लिए अपने आप में एक लाइन पर तीन या अधिक एस्टेरिस्क (***), डैश (---) या अंडरस्कोर (___) इस्तेमाल करें।

मार्कडाउन
HTML (एचटीएमएल)
रेंडर आउटपुट
***
<hr>

---
<hr>

___
<hr>

छवि

छवि जोड़ने के लिए एक्सक्लेमेशन मार्क (!) जोड़ें, उसके बाद ब्रैकेट में ऑल्ट टेक्स्ट और कोष्ठक में छवि का पथ या URL। पथ या URL के बाद वैकल्पिक रूप से कोटेशन मार्क में टाइटल जोड़ सकते हैं।

मार्कडाउन
HTML
रेंडर आउटपुट
![The San Juan Mountains](https://mdg.imgix.net/assets/images/san-juan-mountains.jpg "San Juan Mountains")
<img src="https://mdg.imgix.net/assets/images/san-juan-mountains.jpg" alt="The San Juan Mountains" title="San Juan Mountains">
The San Juan Mountains

कैरेक्टर एस्केप करना

Markdown दस्तावेज़ में टेक्स्ट फॉर्मैट करने के लिए अन्यथा इस्तेमाल होने वाले लिटरल कैरेक्टर दिखाने के लिए कैरेक्टर के सामने बैकस्लैश (\) जोड़ें।

मार्कडाउन
रेंडर आउटपुट
\* Without the backslash, this would be a bullet in an unordered list.

* Without the backslash, this would be a bullet in an unordered list.

जिन कैरेक्टर को आप एस्केप कर सकते हैं

आप बैकस्लैश से निम्नलिखित कैरेक्टर एस्केप कर सकते हैं:

\backslash
`backtick
*asterisk
_underscore
{ }curly braces
[ ]brackets
( )parentheses
#pound sign
+plus sign
-minus sign (hyphen)
.dot
!exclamation mark
|pipe

टेबल

टेबल जोड़ने के लिए प्रत्येक कॉलम के हेडर बनाने के लिए तीन या अधिक हाइफन (---) इस्तेमाल करें और कॉलम अलग करने के लिए पाइप (|) इस्तेमाल करें। वैकल्पिक रूप से टेबल के दोनों सिरों पर पाइप जोड़ सकते हैं।

मार्कडाउन
रेंडर आउटपुट
| Syntax    | Description |
| --------- | ----------- |
| Header    | Title       |
| Paragraph | Text        |
SyntaxDescription
HeaderTitle
ParagraphText

अलाइनमेंट

हेडर रो में हाइफन के बाएं, दाएं या दोनों तरफ कोलन (:) जोड़कर कॉलम में टेक्स्ट को बाएं, दाएं या सेंटर में अलाइन कर सकते हैं।

मार्कडाउन
रेंडर आउटपुट
| Align Left | Align Center | Align Right |
| :--- | :---: | ---: |
| This | This | This |
| column | column | column |
| will | will | will |
| align | align | align |
| left | center | right |
बाएं अलाइनसेंटर अलाइनदाएं अलाइन
ThisThisThis
columncolumncolumn
willwillwill
alignalignalign
leftcenterright