Guide de syntaxe Markdown
Référence complète de la syntaxe Markdown pour rédiger des documents bien mis en forme
Markdown est un langage de balisage léger : quelques symboles simples suffisent pour transformer du texte en titres, listes et tableaux. Ses règles sont faciles et vite apprises, d’où son succès pour les notes, les devoirs et la documentation technique. Ce guide couvre toute la syntaxe Markdown prise en charge par MarkPDF.
Titres
Le symbole # crée un titre ; le nombre de # fixe le niveau, de H1 à H6
# Heading 1 ## Heading 2 ### Heading 3 #### Heading 4 ##### Heading 5 ###### Heading 6
<h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6>
Paragraphes et sauts de ligne
Séparez les paragraphes par une ligne vide. Pour un saut de ligne dans le même paragraphe, terminez la ligne par deux espaces avant d’appuyer sur Entrée
This is paragraph one. This is paragraph two. Line one with two spaces at end Line two (soft break)
<p>This is paragraph one.</p> <p>This is paragraph two.</p> <p>Line one with two spaces at end<br> Line two (soft break)</p>
Mise en valeur
Entourez le texte d’astérisques ou de tirets bas pour le mettre en gras ou en italique
*Italic* or _italic_ **Bold** or __bold__ ***Bold and italic*** ~~Strikethrough~~
<em>Italic</em> <strong>Bold</strong> <strong><em>Bold and italic</em></strong> <del>Strikethrough</del>
Listes
Listes numérotées, à puces et imbriquées
Unordered list: - Item 1 - Item 2 - Nested item - Another nested Ordered list: 1. First 2. Second 3. Third
<ul> <li>Item 1</li> <li>Item 2 <ul> <li>Nested item</li> <li>Another nested</li> </ul> </li> </ul> <ol> <li>First</li> <li>Second</li> <li>Third</li> </ol>
Liens et images
Associez crochets et parenthèses pour créer des liens et insérer des images
[Link text](https://example.com) [Link with title](https://example.com "Title") 
<a href="https://example.com">Link text</a> <a href="https://example.com" title="Title">Link with title</a> <img src="https://example.com/image.png" alt="Image alt">
Code
Un accent grave pour le code dans le texte, trois pour un bloc de code
Inline `code` in text.
```javascript
function hello() {
console.log("Hello!");
}
```<code>code</code>
<pre><code class="language-javascript">
function hello() {
console.log("Hello!");
}
</code></pre>Tableaux
Des barres verticales et des tirets forment un tableau ; l’alignement des colonnes est réglable
| Header 1 | Header 2 | Header 3 | |----------|:--------:|---------:| | Left | Center | Right | | Cell | Cell | Cell |
<table> <thead><tr> <th>Header 1</th> <th align="center">Header 2</th> <th align="right">Header 3</th> </tr></thead> <tbody> <tr><td>Left</td><td>Center</td><td>Right</td></tr> <tr><td>Cell</td><td>Cell</td><td>Cell</td></tr> </tbody> </table>
Citations
Le symbole > crée une citation ; les citations peuvent être imbriquées
> This is a blockquote. > It can span multiple lines. > > > Nested blockquote
<blockquote> <p>This is a blockquote. It can span multiple lines.</p> <blockquote><p>Nested blockquote</p></blockquote> </blockquote>
Lignes horizontales
Trois tirets, astérisques ou tirets bas (ou plus) tracent une ligne de séparation
--- *** ___
<hr>
Caractères d’échappement
Une barre oblique inverse devant un symbole spécial l’affiche comme du texte normal
\*Not italic\* \# Not a heading \[Not a link\]
*Not italic* # Not a heading [Not a link]