Markdown-syntaxgids
Essentiële syntax voor je documenten
Overzicht
Markdown is een lichtgewicht opmaaktaal voor geformatteerde platte teksten. Sinds 2004 (John Gruber) een van de meest gebruikte ter wereld.
Anders dan WYSIWYG-editors: je voegt Markdown-syntax toe aan de tekst om aan te geven welke woorden en zinsdelen anders moeten worden weergegeven.
Koppen
Plaats # voor een woord of zinsdeel. Het aantal # komt overeen met het kopniveau (bijv. ### voor niveau 3).
Heading level 1
Heading level 2
Heading level 3
Heading level 4
Heading level 5
Heading level 6
Paragrafen
Paragrafen ontstaan door lege regels tussen tekstregels.
It lets me write easily.
<p>It lets me write easily.</p>
I really like using Markdown.
It lets me write easily.
Regelbreuken
Eindig een regel met twee of meer spaties en druk op Enter.
And this is the second line.
And this is the second line.</p>
This is the first line.
And this is the second line.
Nadruk
Nadruk met vet of cursief.
Vet
** of __ voor en na een woord of zinsdeel.
I just love bold text.
I just love bold text.
Cursief
* of _ voor en na een woord of zinsdeel.
The cat meows.
The cat meows.
Vet en cursief
*** of ___ voor en na een woord of zinsdeel.
This text is really important.
This text is really important.
Citaten
Plaats > vóór een paragraaf.
Dorothy followed her through many of the beautiful rooms in her castle.
Geneste citaten
Plaats >> vóór de paragraaf die je wilt nesten.
>
>> 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.
Lijsten
Geordende en ongeordende lijsten mogelijk.
Geordende lijsten
Getallen met punt vóór elke regel. De lijst begint bij 1.
2. Second item
3. Third item
4. Fourth item
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ol>
- First item
- Second item
- Third item
- Fourth item
Ongeordende lijsten
Begin regels met -, * of +.
- Second item
- Third item
- Fourth item
<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
Code
Plaats een woord of zinsdeel tussen backticks (`).
At the command prompt, type nano.
Codeblokken
Elke regel minstens 4 spaties of 1 tab inspringen, of ``` vóór en na het blok.
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}
```
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}Horizontale lijnen
Drie of meer ***, --- of ___ op een eigen regel.
Links
Linktekst in [ ], gevolgd door URL in ( ), bijv. [Duck Duck Go](https://duckduckgo.com).
My favorite search engine is Duck Duck Go.
Titels voor links
Optioneel een titel tussen aanhalingstekens na de URL – verschijnt als tooltip.
My favorite search engine is Duck Duck Go.
Afbeeldingen
! gevolgd door [alt-tekst] en (URL of pad). Optioneel titel tussen aanhalingstekens.

Escapen
Backslash \ vóór een teken dat anders voor opmaak wordt gebruikt, om het letterlijk te tonen.
* Without the backslash, this would be a bullet in an unordered list.
Te escapen tekens
Backslash om o.a. te escapen:
| \ | backslash |
| ` | backtick |
| * | asterisk |
| _ | underscore |
| { } | curly braces |
| [ ] | brackets |
| ( ) | parentheses |
| # | pound sign |
| + | plus sign |
| - | minus sign (hyphen) |
| . | dot |
| ! | exclamation mark |
| | | pipe |
Tabellen
Gebruik --- voor elke kolomkop en | om kolommen te scheiden.
| --------- | ----------- |
| Header | Title |
| Paragraph | Text |
| Syntax | Description |
|---|---|
| Header | Title |
| Paragraph | Text |
Uitlijning
Plaats : links, rechts of aan beide kanten van de --- in de koprij om uit te lijnen.
| :--- | :---: | ---: |
| This | This | This |
| column | column | column |
| will | will | will |
| align | align | align |
| left | center | right |
| Links | Midden | Rechts |
|---|---|---|
| This | This | This |
| column | column | column |
| will | will | will |
| align | align | align |
| left | center | right |