Ghid sintaxă Markdown

Sintaxă esențială pentru formatarea documentelor

Prezentare

Markdown este un limbaj de marcare ușor pentru adăugarea formatării la text simplu. Creat de John Gruber în 2004, este unul dintre cele mai populare limbaje de marcare.

Folosirea Markdown diferă de un editor WYSIWYG. În Word apăsați butoane; în Markdown adăugați sintaxă în text pentru a indica ce arată diferit.

Titluri

Pentru titlu, adăugați # înainte de cuvânt sau frază. Numărul de # corespunde nivelului (ex. ### = nivel 3).

Markdown
HTML
Rezultat randare
# 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

Paragrafe

Pentru paragrafe, separați liniile de text cu o linie goală.

Markdown
HTML
Rezultat randare
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.

Linii noi

Pentru linie nouă, terminați linia cu două spații și apăsați Enter.

Markdown
HTML
Rezultat randare
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.

Emfază

Puteți adăuga emfază cu aldin sau cursiv.

Aldin

Aldin: ** sau __ înainte și după cuvânt sau frază.

Markdown
HTML
Rezultat randare
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.

Cursiv

Cursiv: * sau _ înainte și după cuvânt sau frază.

Markdown
HTML
Rezultat randare
The *cat* meows.
The <em>cat</em> meows.

The cat meows.

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

The cat meows.

Aldin și cursiv

Împreună: *** sau ___ înainte și după text.

Markdown
HTML
Rezultat randare
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.

Citate

Citat: adăugați > înainte de paragraf.

Markdown
HTML
Rezultat randare
> 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.

Citate imbricate

Citatele pot fi imbricate. Adăugați >> înainte de paragraful de imbricat.

Markdown
Rezultat randare
> 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.

Liste

Puteți crea liste numerotate și cu puncte.

Liste numerotate

Listă numerotată: numere cu punct la începutul fiecărei linii, începeți cu 1.

Markdown
HTML
Rezultat randare
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

Liste cu puncte

Listă cu puncte: - sau * sau + la începutul fiecărei linii.

Markdown
HTML
Rezultat randare
- 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

Cod

Pentru a marca text ca cod, puneți-l între backtick-uri `.

Markdown
HTML
Rezultat randare
At the command prompt, type `nano`.
At the command prompt, type <code>nano</code>.

At the command prompt, type nano.

Blocuri cod

Bloc cod: indentare cel puțin 4 spații sau tab pe fiecare linie, sau ``` înainte și după bloc.

Markdown
Rezultat randare
```
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}
```
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}

Linii orizontale

Linie orizontală: *** sau --- sau ___ pe o linie separată.

Markdown
HTML
Rezultat randare
***
<hr>

---
<hr>

___
<hr>

Imagini

Imagine: ! apoi [text alt](URL imagine), opțional titlu în ghilimele.

Markdown
HTML
Rezultat randare
![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

Caractere speciale

Pentru a afișa un caracter folosit la formatare, adăugați \ înainte.

Markdown
Rezultat randare
\* Without the backslash, this would be a bullet in an unordered list.

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

Caractere de escapare

Puteți folosi backslash pentru a escapa:

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

Tabele

Tabel: --- pentru antet coloane, | pentru separare coloane.

Markdown
Rezultat randare
| Syntax    | Description |
| --------- | ----------- |
| Header    | Title       |
| Paragraph | Text        |
SyntaxDescription
HeaderTitle
ParagraphText

Aliniere

Adăugați : la stânga, dreapta sau ambele părți ale --- în rândul antet pentru aliniere coloane.

Markdown
Rezultat randare
| Align Left | Align Center | Align Right |
| :--- | :---: | ---: |
| This | This | This |
| column | column | column |
| will | will | will |
| align | align | align |
| left | center | right |
StângaCentruDreapta
ThisThisThis
columncolumncolumn
willwillwill
alignalignalign
leftcenterright