Html Creating a list

To create a list in HTML, you can use the <ul> and <li> tags. Here's an example code for an unordered list:

<ul>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>

In this example, <ul> is the unordered list tag and <li> is the list item tag. You can add as many list items as you need by repeating the <li> tag.

 

You can also create an ordered list using the <ol> tag. Here's an example code for an ordered list:

<ol>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item</li>
</ol>

In an ordered list, the items are numbered sequentially by default.

 

You can also nest lists by placing a list inside a list item. Here's an example code for a nested list:

<ul>
  <li>Item 1</li>
  <li>Item 2
    <ul>
      <li>Subitem 1</li>
      <li>Subitem 2</li>
    </ul>
  </li>
  <li>Item 3</li>
</ul>

In this example, the second list item contains a nested unordered list. Note that the nested list is indented to show that it belongs to the second list item.

Comments

There are no comments, make the firs comment