HTML : Unordered & Ordered lists

You add a new meaning of a text when you surround it by a tag. Whenever you surround content in a <ul> or <ol> you are telling the browser that piece of text should be rendered as an unordered list ,<ul> or ordered list , <ul> to add individual values we use <li> as list.

An example of unordered lists is :

<h2>Lists</h2>

<p>Unordered list:</p>

<ul>
  <li>ul: means unordered list and have to wrap the whole list</li>
  <li>inside unorderedlist should be li, list elements</li>
  <li>since is an unorderedlist they doesn't have order</li>
</ul>

As the example below unordered list have a strict rule it have to be called with the <ul> tag and should only contain <li> elements.

An example of ordered list is:

<p>Ordered list:</p>

<ol>
  <li>ol: means ordered list and have to wrap the whole lists</li>
  <li>As we know li stands for list and goes inside </li>
  <li>This list goes in incrementing order</li>
</ol>

As we see in the example below ordered list have have a particular difference from unordered list as its name say ordered list have an order and this order is incrementing according to how many list you add.

This kind of list it is well use when we are using step-by-step procedures like instructions or recipes or topics that goes inside a field.

Leave a comment

Design a site like this with WordPress.com
Get started