Uitleg Wiki

Inleiding

De Wiki van de Mini Seven Club Nederland maakt gebruik van Markdown als opmaak-taal, uitgebreid met de extensies van [Markdown Extra][extra] en speciale extra voorzieningen voor het opnemen van afbeeldingen, eenvoudig linken naar andere pagina's op deze Wiki en het automatisch genereren van inhoudsopgaves. Hieronder zullen de opmaak-mogelijkheden van de Wiki worden besproken. Voor wie het allemaal al eens heeft gezien, maar even snel iets wil opzoeken, is er ook een Wiki cheatsheet|cheatsheet.

Een belangrijk uitgangspunt van Markdown is dat de "kale" tekst ook goed leesbaar is. Hoewel beïnvloed door verschillende andere tekst-naar-HTML vertalers, is een van de belangrijkste inspiratiebronnen email, verstuurd als platte tekst. Om deze reden bestaat de Markdown-syntax uitsluitend uit interpunctie-karakters, waarbij die karakters zorgvuldig gekozen zijn om er zo uit te zien waar ze voor bedoeld zijn. Een woord met sterretjes ervoor en erachter ziet eruit als een woord waar extra nadruk op gelegd wordt en een lijst (opsomming) in Markdown ziet er ook uit als een lijst. Zelfs quotes zien eruit als aangehaalde passages, aangenomen dat u ooit email in platte tekst heeft gebruikt.

In deze tekst staan dus Markdown, Markdown Extra en custom onderdelen van het invoerformaat door elkaar. Zaken die afwijken van standaard Markdown zullen worden gemarkeerd met [E][extra] voor Markdown Extra en met [C][mscn] voor custom uitbreidingen voor de Wiki van de Mini Seven Club Nederland. De tekst is gebaseerd op de oorspronkelijke documentatie van Markdown op Daring Fireball, maar is op verschillende plaatsen aangepast voor gebruikers die geen achtergrond in HTML hebben.

Blok-elementen

###Alinea's en regel-eindes###

Een alinea wordt gemaakt met een of meer opeenvolgende regels tekst, gevolgd door een of meer lege regels (een lege regel is een regel die eruit ziet als een lege regel -- een regel die alleen spaties of tabs bevat wordt ook gezien als lege regel). Normale alinea's moeten niet vooraf gegaan worden door spaties of tabs.

De implicatie van de regel "een of meer opeenvolgende regels" is dat Markdown "hard afgebroken" alinea's ondersteunt, d.w.z. regels die met een enter zijn afgebroken om de leesbaarheid van de ongeformateerde tekst te vergroten. Dit wijkt in belangrijke mate af van de meeste tekst-naar-HTML omzetters, die elk regeleinde-karakter in een alinea omzetten in een hard regeleinde in HTML (<br /> tag).

Wanneer er wel een regeleinde ingevoegd moet worden, dan kan dit door de regel te laten eindigen met twee of meer spaties.

Ja, dit vergt wat extra moeite, maar een simplistische regel "elk regeleinde is een <br />" zou niet werken voor Markdown. De email-stijl quotes en multi-alinea lijst-items werken het beste -- en zien er beter uit -- wanneer ze geformatteerd worden met behulp van harde regeleindes.

###Koppen###

Markdown ondersteund twee manieren om koppen op te geven, Setext and atx.

Setext-stijl koppen zijn "onderstreept" met min-tekens. Bijvoorbeeld:

Dit is een kop
-----------

Het maakt niet uit met hoeveel -'s onderstreept wordt.

N.b.[C][mscn]: Standaard Markdown ondersteunt twee niveau's koppen op deze manier, de variant die hier gebruikt wordt is voor het tweede niveau kop, oftewel een <h2> tag, in HTML. Het niveau erboven, de <h1> is op deze site voorbehouden aan de pagina-titel. In standaard Markdown wordt deze aangeduid door te onderstepen met is-tekens (=).

Atx-stijl koppen maken gebruik van 2-6 hekjes-karakters aan het begin van de regel, corresponderend met kop niveau's 2-6. Bijvoorbeeld:

## Dit is een H2

###### Dit is een H6

Optioneel is het toegestaan om atx-stijl koppen "af te sluiten", d.w.z. ook hekjes aan het eind van de regel plaatsen. Dit is puur cosmetisch, het is toegestaan om het te gebruiken als u dit netter vind staan. Het aantal afsluitende hekjes hoeft niet eens overeen te komen met het aantal hekjes aan het begin. (Het aantal hekjes aan het begin bepaald het kop-niveau.) :

## Dit is een H2 ##

### Dit is een H3 ######

N.b.[C][mscn]: Ook voor atx-stijl koppen geldt dat standaard Markdown ook H1 ondersteunt. Op deze site worden deze uitgefilterd omdat dit voorbehouden is aan de pagina-titel.

Kop-niveau's dienen normaal gesproken op een logische manier tot een hierarschie gecombineerd te worden; sub-koppen onder een H2 worden een H3, sub-koppen daaronder worden een H4; het is niet zozeer een cosmetische kwestie (wat staat mooi) als een logische kwestie (wat hoort waar bij) welke kop gebruikt wordt.

Automatische inhoudsopgave[C][mscn]

Bij drie of meer koppen wordt er automatisch een inhoudsopgave gegenereerd voor de pagina. Hierdoor kan er ook intern gelinkt worden naar delen van de pagina (zie hierover het gedeelte over [linken][#Links]).

###Quotes###

Markdown gebruikt email-stijl > karakters voor het aangeven van quotes. Ben je bekend met het quoten van passages in een email-bericht, dan weet je ook hoe je een quote-blok moet maken in Markdown. Het ziet er het netste uit als je de tekst hard afbreekt en voor elke regel een > plaatst:

> Dit is een quote-blok met twee alinea's. Lorem ipsum dolor sit amet,
> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
> 
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
> id sem consectetuer libero luctus adipiscing.

Markdown staat je toe om lui te zijn en alleen een > voor de eerste regel van een hard afgebroken alinea te zetten:

> Dit is een quote-blok met twee alinea's. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
id sem consectetuer libero luctus adipiscing.

Quote-blokken kunnen worden genest (dus een quote-blok binnen een quote-blok) door het toevoegen van extra niveaus >:

> Dit is het eerste niveau van de quote.
>
> > Dit is een geneste quote.
>
> Terug naar het eerste niveau.

Quote-blokken kunnen andere Markdown-elementen bevatten, inclusief koppen, lijsten en code-blokken:

> ## Dit is een kop.
> 
> 1.   Dit is het eerste lijst-item.
> 2.   Dit is het tweede lijst-item.
> 
> Dit is wat voorbeeld-code:
> 
>     return shell_exec(\"echo $input | $markdown_script\");

Elke fatsoenlijke tekst-editor moet het eenvoudig maken om email-stijl quotes toe te passen. Bijvoorbeeld, met BBEdit kun je een selectie maken en daarna "Increase Quote Level" uit het Text-menu kiezen.

N.b.[C][mscn]: Op deze Wiki werk je normaal gesproken vanuit de browser, waarbij dit soort zaken over het algemeen niet beschikbaar zijn. Heb je veel te bewerken, dan kun je wel overwegen om de tekst eerst voor te bereiden in je favorite tekst-editor.

Lijsten

Markdown ondersteunt geordende (genummerde) en ongeordende (punt-) lijsten.

Ongeordende lijsten gebruiken asterisken (sterretjes), plussen en minnen -- uitwisselbaar -- als lijst-markeringen:

*   Rood
*   Groen
*   Blauw

is equivalent aan:

+   Rood
+   Groen
+   Blauw

en:

-   Rood
-   Groen
-   Blauw

Geordende lijsten gebruiken nummers gevolgd door een punt:

1.  Vogel
2.  McHale
3.  Kerk

Het is belangrijk om op te merken dat de eigenlijke nummers die gebruikt worden geen effect hebben op de uitvoer van Markdown. De weergave van bovenstaande lijst:

  1. Vogel
  2. McHale
  3. Kerk

Als je in plaats daarvan de lijst als volgt in Markdown had geschreven:

1.  Vogel
1.  McHale
1.  Kerk

or zelfs:

1. Vogel
8. McHale
3. Kerk

dan zou je exact dezelfde uitvoer krijgen. Het punt is, als je wil, kun je opeenvolgende nummers gebruiken in je geordende Markdown-lijsten, zodat de nummers in de bron-tekst overeenkomen met de nummers in de webpagina. Maar je kunt lui zijn, want het hoeft niet.

Gebruik je de luie manier van nummeren, dan moet de lijst wel beginnen met het nummer 1. Mogelijk zal Markdown ooit in de toekomst ondersteunen dat de lijst met een willekeurig nummer begint.

Lijst-markeringen staan normaal gesproken aan de linker kantlijn, maar mogen vooraf gegaan worden door maximaal drie spaties. Lijst-markeringen moeten gevolgd worden door een of meer spaties of een tab.

Om lijsten er netjes uit te laten zien, mag je lijst-items afbreken met "hangende" indents:

*   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
    viverra nec, fringilla in, laoreet vitae, risus.
*   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
    Suspendisse id sem consectetuer libero luctus adipiscing.

Maar, je mag lui zijn, het hoeft niet:

*   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
viverra nec, fringilla in, laoreet vitae, risus.
*   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
Suspendisse id sem consectetuer libero luctus adipiscing.

Als items worden gescheiden door lege regels, dan zal Markdown de items verpakken in een alinea. Bijvoorbeeld, deze invoer:

*   Vogel
*   Magie

zal worden omgezet in:

  • Vogel
  • Magie

Maar dit:

*   Bird

*   Magic

zal worden omgezet in:

  • Bird

  • Magic

Lijst-items mogen bestaan uit meerdere alinea's. Alle opvolgende alinea's binnen een lijst-item moeten vooraf gegaan worden door 4 spaties of een tab:

1.  Dit is een lijst-item met twee alinea's. Lorem ipsum dolor
    sit amet, consectetuer adipiscing elit. Aliquam hendrerit
    mi posuere lectus.

    Vestibulum enim wisi, viverra nec, fringilla in, laoreet
    vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
    sit amet velit.

2.  Suspendisse id sem consectetuer libero luctus adipiscing.

Het ziet er netjes uit als je elke regel van de volgende alinea's laat inspringen, maar Markdown laat het je opnieuw toe om lui te zijn:

*   Dit is een lijst-item met twee alinea's.

    Dit is de tweede alinea van het lijst-item. Het is
alleen nodig om de eerste regel te laten inspringen. 
Lorem ipsum dolor sit amet, consectetuer adipiscing 
elit.

*   Nog een item in dezelfde lijst.

Om een quote-blok op te nemen in een lijst-item moeten de > van het quote-blok worden ingesprongen:

*   Een lijst-item met een quote-blok:

    > Dit is een quote-blok binnen 
    > een lijst-item.

Om een code-blok op te nemen in een lijst-item, moet het blok twee maal ingesprongen worden -- 8 spaties of twee tabs:

*   Een lijst-item met een code-blok:

        <code komt hier>

Het is de moeite waard om op te merken dat het mogelijk is om per ongeluk een geordende lijst te starten, door iets als dit te schrijven:

1986. Wat een geweldig jaar.

Met andere woorden, een rijtje nummer-punt-spatie aan het begin van een regel. Om dit te voorkomen kun je de escapen met een backslashs:

1986\\. Wat een geweldig jaar.

Code-blokken

Voor-geformatteerde code-blokken worden gebruikt om te schrijven over programmeren of broncode voor webpagina's. In plaats van het vormen van normale alinea's worden de regels van een code-blok letterlijk geïnterpreteerd. Markdown verpakt een code-blok is zowel <pre> als <code> tags.

Om een code-blok in Markdown te produceren moet elke regel ingesprongen worden met tenminste 4 spaties of 1 tab. Bijvoorbeeld, met deze invoer:

Dit is een normale alinea:

    Dit is een code-blok.

maakt Markdown dit:

Dit is een normale alinea:

Dit is een code-blok.

Eén niveau van inspringen -- 4 spaties of 1 tab -- wordt verwijderd uit elke regel van het code-blok. Bijvoorbeeld, dit:

Dit is een voorbeeld van AppleScript:

    tell application \"Foo\"
        beep
    end tell

Zal omgezet worden in:

<p>Here is an example of AppleScript:</p>

<pre><code>tell application \"Foo\"
    beep
end tell
</code></pre>

Een code-blok loopt door totdat er een regel bereikt wordt die niet ingesprongen is (of het einde van de tekst).

Normale Markdown-syntax en eventuele HTML-tags worden niet verwerkt binnen code-blokken, maar weergegeven zoals ze ook in de bron-tekst staan. Dit betekent dat het eenvoudig is om met Markdown te schrijven over HTML- en Markdown-syntax.

Horizontal Rules

You can produce a horizontal rule tag (<hr />) by placing three or more hyphens, asterisks, or underscores on a line by themselves. If you wish, you may use spaces between the hyphens or asterisks. Each of the following lines will produce a horizontal rule:

* * *

***

*****

- - -

---------------------------------------

Span Elements

Links

Markdown supports two style of links: inline and reference.

In both styles, the link text is delimited by [square brackets].

To create an inline link, use a set of regular parentheses immediately after the link text's closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an optional title for the link, surrounded in quotes. For example:

This is [an example](http://example.com/ \"Title\") inline link.

[This link](http://example.net/) has no title attribute.

Will produce:

<p>This is <a href=\"http://example.com/\" title=\"Title\">
an example</a> inline link.</p>

<p><a href=\"http://example.net/\">This link</a> has no
title attribute.</p>

If you're referring to a local resource on the same server, you can use relative paths:

See my [About](/about/) page for details.   

Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:

This is [an example][id] reference-style link.

You can optionally use a space to separate the sets of brackets:

This is [an example] [id] reference-style link.

Then, anywhere in the document, you define your link label like this, on a line by itself:

[id]: http://example.com/  \"Optional Title Here\"

That is:

  • Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces);
  • followed by a colon;
  • followed by one or more spaces (or tabs);
  • followed by the URL for the link;
  • optionally followed by a title attribute for the link, enclosed in double or single quotes, or enclosed in parentheses.

The following three link definitions are equivalent:

[foo]: http://example.com/  \"Optional Title Here\"
[foo]: http://example.com/  'Optional Title Here'
[foo]: http://example.com/  (Optional Title Here)

Note: There is a known bug in Markdown.pl 1.0.1 which prevents single quotes from being used to delimit link titles.

The link URL may, optionally, be surrounded by angle brackets:

[id]: <http://example.com/>  \"Optional Title Here\"

You can put the title attribute on the next line and use extra spaces or tabs for padding, which tends to look better with longer URLs:

[id]: http://example.com/longish/path/to/resource/here
    \"Optional Title Here\"

Link definitions are only used for creating links during Markdown processing, and are stripped from your document in the HTML output.

Link definition names may consist of letters, numbers, spaces, and punctuation -- but they are not case sensitive. E.g. these two links:

[link text][a]
[link text][A]

are equivalent.

The implicit link name shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets -- e.g., to link the word "Google" to the google.com web site, you could simply write:

[Google][]

And then define the link:

[Google]: http://google.com/

Because link names may contain spaces, this shortcut even works for multiple words in the link text:

Visit [Daring Fireball][] for more information.

And then define the link:

[Daring Fireball]: http://daringfireball.net/

Link definitions can be placed anywhere in your Markdown document. I tend to put them immediately after each paragraph in which they're used, but if you want, you can put them all at the end of your document, sort of like footnotes.

Here's an example of reference links in action:

I get 10 times more traffic from [Google] [1] than from
[Yahoo] [2] or [MSN] [3].

  [1]: http://google.com/        \"Google\"
  [2]: http://search.yahoo.com/  \"Yahoo Search\"
  [3]: http://search.msn.com/    \"MSN Search\"

Using the implicit link name shortcut, you could instead write:

I get 10 times more traffic from [Google][] than from
[Yahoo][] or [MSN][].

  [google]: http://google.com/        \"Google\"
  [yahoo]:  http://search.yahoo.com/  \"Yahoo Search\"
  [msn]:    http://search.msn.com/    \"MSN Search\"

Both of the above examples will produce the following HTML output:

<p>I get 10 times more traffic from <a href=\"http://google.com/\"
title=\"Google\">Google</a> than from
<a href=\"http://search.yahoo.com/\" title=\"Yahoo Search\">Yahoo</a>
or <a href=\"http://search.msn.com/\" title=\"MSN Search\">MSN</a>.</p>

For comparison, here is the same paragraph written using Markdown's inline link style:

I get 10 times more traffic from [Google](http://google.com/ \"Google\")
than from [Yahoo](http://search.yahoo.com/ \"Yahoo Search\") or
[MSN](http://search.msn.com/ \"MSN Search\").

The point of reference-style links is not that they're easier to write. The point is that with reference-style links, your document source is vastly more readable. Compare the above examples: using reference-style links, the paragraph itself is only 81 characters long; with inline-style links, it's 176 characters; and as raw HTML, it's 234 characters. In the raw HTML, there's more markup than there is text.

With Markdown's reference-style links, a source document much more closely resembles the final output, as rendered in a browser. By allowing you to move the markup-related metadata out of the paragraph, you can add links without interrupting the narrative flow of your prose.

Emphasis

Markdown treats asterisks (*) and underscores (_) as indicators of emphasis. Text wrapped with one * or _ will be wrapped with an HTML <em> tag; double *'s or _'s will be wrapped with an HTML <strong> tag. E.g., this input:

*single asterisks*

_single underscores_

**double asterisks**

__double underscores__

will produce:

<em>single asterisks</em>

<em>single underscores</em>

<strong>double asterisks</strong>

<strong>double underscores</strong>

You can use whichever style you prefer; the lone restriction is that the same character must be used to open and close an emphasis span.

Emphasis can be used in the middle of a word:

un*frigging*believable

But if you surround an * or _ with spaces, it'll be treated as a literal asterisk or underscore.

To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it:

\\*this text is surrounded by literal asterisks\\*

Code

To indicate a span of code, wrap it with backtick quotes (`). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

Use the `printf()` function.

will produce:

<p>Use the <code>printf()</code> function.</p>

To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters:

``There is a literal backtick (`) here.``

which will produce this:

<p><code>There is a literal backtick (`) here.</code></p>

The backtick delimiters surrounding a code span may include spaces -- one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span:

A single backtick in a code span: `` ` ``

A backtick-delimited string in a code span: `` `foo` ``

will produce:

<p>A single backtick in a code span: <code>`</code></p>

<p>A backtick-delimited string in a code span: <code>`foo`</code></p>

With a code span, ampersands and angle brackets are encoded as HTML entities automatically, which makes it easy to include example HTML tags. Markdown will turn this:

Please don't use any `<blink>` tags.

into:

<p>Please don't use any <code>&lt;blink&gt;</code> tags.</p>

You can write this:

`&#8212;` is the decimal-encoded equivalent of `&mdash;`.

to produce:

<p><code>&amp;#8212;</code> is the decimal-encoded
equivalent of <code>&amp;mdash;</code>.</p>

Images

Admittedly, it's fairly difficult to devise a "natural" syntax for placing images into a plain text document format.

Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference.

Inline image syntax looks like this:

![Alt text](/path/to/img.jpg)

![Alt text](/path/to/img.jpg \"Optional title\")

That is:

  • An exclamation mark: !;
  • followed by a set of square brackets, containing the alt attribute text for the image;
  • followed by a set of parentheses, containing the URL or path to the image, and an optional title attribute enclosed in double or single quotes.

Reference-style image syntax looks like this:

![Alt text][id]

Where "id" is the name of a defined image reference. Image references are defined using syntax identical to link references:

[id]: url/to/image  \"Optional title attribute\"

As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML <img> tags.


Miscellaneous

Automatic Links

Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:

<http://example.com/>

Markdown will turn this into:

<a href=\"http://example.com/\">http://example.com/</a>

Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. For example, Markdown will turn this:

<address@example.com>

into something like this:

<a href=\"&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
&#115;&#115;&#64;&#101;&#120;&#x61;&#109;&#x70;&#x6C;e&#x2E;&#99;&#111;
&#109;\">&#x61;&#x64;&#x64;&#x72;&#x65;&#115;&#115;&#64;&#101;&#120;&#x61;
&#109;&#x70;&#x6C;e&#x2E;&#99;&#111;&#109;</a>

which will render in a browser as a clickable link to "address@example.com".

(This sort of entity-encoding trick will indeed fool many, if not most, address-harvesting bots, but it definitely won't fool all of them. It's better than nothing, but an address published in this way will probably eventually start receiving spam.)

Backslash Escapes

Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown's formatting syntax. For example, if you wanted to surround a word with literal asterisks (instead of an HTML <em> tag), you can use backslashes before the asterisks, like this:

\\*literal asterisks\\*

Markdown provides backslash escapes for the following characters:

\\   backslash
`   backtick
*   asterisk
_   underscore
{}  curly braces
[]  square brackets
()  parentheses
#   hash mark
+	plus sign
-	minus sign (hyphen)
.   dot
!   exclamation mark

Automatic Escaping for Special Characters

In HTML, there are two characters that demand special treatment: < and &. Left angle brackets are used to start tags; ampersands are used to denote HTML entities. If you want to use them as literal characters, you must escape them as entities, e.g. &lt;, and &amp;.

Ampersands in particular are bedeviling for web writers. If you want to write about 'AT&T', you need to write 'AT&amp;T'. You even need to escape ampersands within URLs. Thus, if you want to link to:

http://images.google.com/images?num=30&q=larry+bird

you need to encode the URL as:

http://images.google.com/images?num=30&amp;q=larry+bird

in your anchor tag href attribute. Needless to say, this is easy to forget, and is probably the single most common source of HTML validation errors in otherwise well-marked-up web sites.

Markdown allows you to use these characters naturally, taking care of all the necessary escaping for you. If you use an ampersand as part of an HTML entity, it remains unchanged; otherwise it will be translated into &amp;.

So, if you want to include a copyright symbol in your article, you can write:

&copy;

and Markdown will leave it alone. But if you write:

AT&T

Markdown will translate it to:

AT&amp;T

Similarly, because Markdown supports inline HTML, if you use angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write:

4 < 5

Markdown will translate it to:

4 &lt; 5

However, inside Markdown code spans and blocks, angle brackets and ampersands are always encoded automatically. This makes it easy to use Markdown to write about HTML code. (As opposed to raw HTML, which is a terrible format for writing about HTML syntax, because every single < and & in your example code needs to be escaped.)

Inline HTML

Markdown's syntax is bedoeld voor een enkel doel: om gebruikt te worden als formaat voor schrijven voor het web. Markdown is geen vervanging voor HTML, zelfs niet grotendeels. De syntax is zeer beperkt en correspondeert met een zeer kleine subset van alle mogelijkheden die HTML biedt. Het idee is om het eenvoudig te maken om eenvoudige tekst te lezen, schrijven en bewerken, niet om een volledige vervanging te bieden voor HTML.

Daarom is het mogelijk om, voor de gevallen waar Markdown geen antwoord heeft, normale HTML te gebruiken. Het is niet nodig om op de een of andere manier aan te geven dat je HTML-tags gaat gebruiken; je voegt gewoon de tags in op het moment dat je ze nodig hebt (uit veiligheidsoverwegingen worden niet alle HTML-tags toegestaan, evenals alle attributen binnen die tags[C][mscn]).

De enige beperking hierbij is dat blok-elementen -- bijv. <div>, <table>, <pre>, <p>, etc. -- gescheiden moeten worden van omringende tekst door lege regels en de begin- en eind-tag van het blok mogen niet ingesprongen zijn met voorgaande tabs of spaties. Markdown is slim genoeg om niet extra (ongewenste) paragraaf-tags (p) toe te voegen rondom de blok-tags.

Om bijvoorbeeld een HTML-tabel toe te voegen:

Dit is een gewone paragraaf.

<table>
    <tr>
        <td>Foo</td>
    </tr>
</table>

Dit is nog een gewone paragraaf.

Houdt er rekening mee dat Markdown formattering niet verwerkt wordt binnen blok-niveau HTML tags. Je kunt bijvoorbeeld niet de Markdown-manier van *nadruk* leggen gebruiken binnen een HTML-blok.

Inline-niveau HTML tags -- bijv. <span>, <cite>, or <del> -- kunnen overal gebruikt worden in een paragraaf, lijst-item of kop. Het is dus mogelijk om <a> of <img> tags te gebruiken in plaats van Markdown's syntax voor links of afbeeldingen. Maak hier echter spaarzaam gebruik van, aangezien niet iedereen even bedreven is met HTML[C][mscn].

In tegenstelling tot blok-elementen, wordt Markdown syntax binnen inline-elementen wel verwerkt.

[extra] : http://michelf.com/projects/php-markdown/extra/ [mscn]: http://www.minisevenclub.nl/wiki/wiki-uitleg