-
Notifications
You must be signed in to change notification settings - Fork 21
Markdown Nesting
This article provides some tips and tricks about nesting elements in lists by using Markdown.
Basically, to nest an element inside a list item, use indentation.
* Unordered list:
* Nested unordered list.
* Second list item.
* Root item.
Result
- Unordered list:
- Nested unordered list.
- Second list item.
- Root item.
1. Ordered list:
1. Nested ordered list.
1. Second list item.
1. Root item.
Result
- Ordered list:
- Nested ordered list.
- Second list item.
- Root item.
Note that the images are inline elements and adding them only with one carriage return will add them to the same list item. To add an image as if it is nested, add one more empty line (that is, create a new paragraph inside the list item).
* Inline image:
![Image Description](./images/html5-logo-icon.png)
* Nested image:
![Image Description](./images/html5-logo.png)
* Additional list item.
Result
-
Inline image:
-
Nested image:
-
Additional list item.
To nest a table, add indentation to all table rows.
1. A list item with a table
|Title|Title|
|-----|-----|
|cell |cell |
1. A second list item
Result
-
A list item with a table
Title Title cell cell -
A second list item
The custom code snippets cannot be nested inside a list item. However, the native MarkDown ones can.
It is important to always add a fake title that hints what is the code in the code snippet.
1. A list item with a code snippet
**ASP.NET**
<telerik:RadButton runat="server" ID="RadButton1" OnClientClicking="OnClientClicking">
</telerik:RadButton>
1. Second list item
Result
-
A list item with a code snippet
ASP.NET
<telerik:RadButton runat="server" ID="RadButton1" OnClientClicking="OnClientClicking"> </telerik:RadButton>
-
Second list item