markdown List HTML tag
In HTML pages, a list of similar items is represented in a formatted way for readability,
Markdown also uses special syntax asterisks *
, hyphen -
, or plus +
to create a list.
There are three types of lists in general;
- Unordered or bullet list
- Ordered or numbered list
- Description list
Unordered List of items in markdown
Also, called bullet lists, represent the list of items in an unordered way.
It uses asterisk *
, hyphen -
or plus +
to create an unordered list
here is a Bullet list syntax
* item 1
* Item 2
- Item 3
- Item 4
+ item 5
+ item 5
Generated HTML code is
<ul>
<li>item 1</li>
<li>Item 2</li>
</ul>
<ul>
<li>Item 3</li>
<li>Item 4</li>
</ul>
<ul>
<li>Item 5</li>
<li>Item 6</li>
</ul>
On a browser, you can see the list as follows.
item 1
Item 2
Item 3
Item 4
item 5
item 5
Ordered List items in markdown
The list of items represents numbers starting from 1,2 etc, and followed by a period .
symbol or right parenthesis.
These can also be called numbered lists
Numbered list syntax:
1. Ordered list element one
2. Ordered list element two
Generated HTML code is
<ol>
<li>Ordered list element one</li>
<li>Ordered list element two</li>
</ol>
user can see the list on the browser as follows
- Ordered list element one
- Ordered list element two
Description List in Markdown
Descriptions list of items with each item containing a description head and description. markdown doesn’t have support for the description list. Please check the extended syntax for different vendors to support the description list.