List#
Ordered list#
To define an ordered list, add a number followed by the dot character (.) to the line start, followed by a space (The numbers order is not important, but the first line number defines the starting point of the list).
It is possible to nest lists by adding at least 4 spaces to the line start compared to the previous level (all the same level elements must have the same number of spaces at the line start).
Markdown | HTML | Rendering |
---|---|---|
| <ol>
<li>First</li>
<li>Second</li>
<li>Third</li>
</ol> |
|
| <ol>
<li>First</li>
<li>Second</li>
<li>Third</li>
</ol> |
|
| <ol>
<li>First</li>
<li>Second</li>
<li>Third</li>
</ol> |
|
| <ol>
<li>First</li>
<li>Second
<ol>
<li>Second.1</li>
<li>Second.2</li>
</ol>
</li>
<li>Third</li>
</ol> |
|
Unordered list#
To define an unordered list, add a hyphen (-), a plus (+) or a star (*) character to the line start, followed by a space.
It is possible to nest lists by adding at least 4 spaces to the line start compared to the previous level (all the same level elements must have the same number of spaces at the line start).
Markdown | HTML | Rendering |
---|---|---|
| <ul>
<li>First</li>
<li>Second</li>
<li>Third</li>
</ul> |
|
| <ul>
<li>First</li>
<li>Second</li>
<li>Third</li>
</ul> |
|
| <ul>
<li>First</li>
<li>Second</li>
<li>Third</li>
</ul> |
|
| <ul>
<li>First</li>
<li>Second
<ul>
<li>Second.1</li>
<li>Second.2</li>
</ul>
</li>
<li>Third</li>
</ul> |
|
Definition list#
To define a definition list, add a colon character (:) to the line start, followed by a space only for lines containing the definition.
Markdown | HTML | Rendering |
---|---|---|
| <dl>
<dt>Definition 1</dt>
<dd>I'm the definition 1</dd>
<dt>Definition 2</dt>
<dd>I'm a definition 2</dd>
<dd>I'm another definition 2</dd>
</dl> |
|
Task list#
To define a task list, use one of the following syntaxes for each task line:
- - [ ] Task_text (For a not yet done task)
- - [x] Task_text (For a done task)
Markdown | HTML | Rendering |
---|---|---|
| <ul>
<li><input disabled="" type="checkbox"> Task 1 not done</li>
<li><input checked="" disabled="" type="checkbox"> Task 2 done</li>
</ul> |
|
Adding items to a list#
To add an element to a list, consider the element as one level lower than the level to be included in the list. Therefore add at least 4 spaces to the line start, in front of each element to be included in the list.
Markdown | HTML | Rendering |
---|---|---|
| <ul>
<li>First</li>
<li>Second
<blockquote><p>I'm a blockquote
<br>
I'm a paragraph</p>
</blockquote>
</li>
<li>Third</li>
</ul> |
|