Lists
Unordered list
The <ul>
element represents an unordered list of items, typically rendered as a bulleted list.
Example:
- Item one
- Item two
- Item three
<ul>
<li>Item one</li>
<li>Item two</li>
<li>Item three</li>
</ul>
Read more at MDN Web Docs: The Unordered List element
Ordered list
The <ol>
element represents an ordered list of items, typically rendered as a numbered list.
Example:
- Item one
- Item two
- Item three
<ol>
<li>Item one</li>
<li>Item two</li>
<li>Item three</li>
</ol>
Read more at MDN Web Docs: The Ordered List element
start attribute
Use the start
attribute to start at a specific number. e.g. <ol start="7">
- Item seven
- Item eight
- Item nine
type attribute
Use the type
attribute to change the numbering e.g. <ol type="i">
- HTML
- CSS
- JavaScript
Nested lists
Lists can be nested inside each other esaily
- Item one
- Item two
- Nested item one
- Nested item two
- Nested item three
- Item three
<ol>
<li>Item one</li>
<li>Item two
<ul>
<li>Nested item one</li>
<li>Nested item two</li>
<li>Nested item three</li>
</ul>
</li>
<li>Item three</li>
</ol>