Fandom

HTML & CSS Wiki

<ul> & <ol>

649pages on
this wiki
Add New Page
Comments0 Share

Lists may be placed in a page using these tags: <ol> (ordered list) and <ul> (unordered list). Items are placed inside them using the <li> (list item) tag. Following is a table showing the two lists side-by-side:

HTML Output
<ul>
  <li>Category 1</li>
  <ul>
    <li>Item 1-1</li>
    <li>Item 1-2</li>
    <li>Item 1-3</li>
  </ul>
  <li>Category 2</li>
  <ul>
    <li>Item 2-1</li>
  </ul>
</ul>
  • Category 1
    • Item 1-1
    • Item 1-2
    • Item 1-3
  • Category 2
    • Item 2-1
<ol>
  <li>Category 1</li>
  <ol>
    <li>Item 1-1</li>
    <li>Item 1-2</li>
    <li>Item 1-3</li>
  </ol>
  <li>Category 2</li>
  <ol>
    <li>Item 2-1</li>
  </ol>
</ol>
  1. Category 1
    1. Item 1-1
    2. Item 1-2
    3. Item 1-3
  2. Category 2
    1. Item 2-1

External linksEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.