HTML Lists

 There are many lists in HTML. The most commonly used lists are given below:

  • <ul>
  • <li>
  • <ol>

<ul>:

<ul> stands for unordered list. <ul> also have closing tag <ul></ul>.

<li>:

<li> stands for list items. <li> also have a closing tag <li></li>. <li> use to make items under <ul>.

For Example:

<ul>
	<li>Milk</li>
	<li>Chocolate</li>
	<li>Snacks</li>
</ul>

Output:

  • Milk
  • Chocolate
  • Snacks

<ol>:

<ol> stands for ordered list. <ol>also have closing tag <ol></ol>. It makes list items under ordered list.

For Example:

<ul>
	<ol>
		<li>Ice Cream</li>
		<li>Butter</li>
		<li>Coke</li>
	</ol>
</ul>

Output:

  1. Ice Cream
  2. Butter
  3. Coke

There are more list in HTML link is given below:

https://www.w3schools.com/html/html_lists.asp

Comments

Popular Posts