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).

Markdown
HTML
Weergave
# 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

Paragrafen

Paragrafen ontstaan door lege regels tussen tekstregels.

Markdown
HTML
Weergave
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.

Regelbreuken

Eindig een regel met twee of meer spaties en druk op Enter.

Markdown
HTML
Weergave
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.

Nadruk

Nadruk met vet of cursief.

Vet

** of __ voor en na een woord of zinsdeel.

Markdown
HTML
Weergave
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.

Cursief

* of _ voor en na een woord of zinsdeel.

Markdown
HTML
Weergave
The *cat* meows.
The <em>cat</em> meows.

The cat meows.

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

The cat meows.

Vet en cursief

*** of ___ voor en na een woord of zinsdeel.

Markdown
HTML
Weergave
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.

Citaten

Plaats > vóór een paragraaf.

Markdown
HTML
Weergave
> 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.

Geneste citaten

Plaats >> vóór de paragraaf die je wilt nesten.

Markdown
Weergave
> 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.

Lijsten

Geordende en ongeordende lijsten mogelijk.

Geordende lijsten

Getallen met punt vóór elke regel. De lijst begint bij 1.

Markdown
HTML
Weergave
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

Ongeordende lijsten

Begin regels met -, * of +.

Markdown
HTML
Weergave
- 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

Code

Plaats een woord of zinsdeel tussen backticks (`).

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

At the command prompt, type nano.

Codeblokken

Elke regel minstens 4 spaties of 1 tab inspringen, of ``` vóór en na het blok.

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

Horizontale lijnen

Drie of meer ***, --- of ___ op een eigen regel.

Markdown
HTML
Weergave
***
<hr>

---
<hr>

___
<hr>

Afbeeldingen

! gevolgd door [alt-tekst] en (URL of pad). Optioneel titel tussen aanhalingstekens.

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

Escapen

Backslash \ vóór een teken dat anders voor opmaak wordt gebruikt, om het letterlijk te tonen.

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

* 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.

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

Uitlijning

Plaats : links, rechts of aan beide kanten van de --- in de koprij om uit te lijnen.

Markdown
Weergave
| Align Left | Align Center | Align Right |
| :--- | :---: | ---: |
| This | This | This |
| column | column | column |
| will | will | will |
| align | align | align |
| left | center | right |
LinksMiddenRechts
ThisThisThis
columncolumncolumn
willwillwill
alignalignalign
leftcenterright