List in HTML, Order list, Unordered list, Definition List

List in HTML, Order list, Unordered list, Definition List

List in HTML can display different items in the form of lists. HTML lists are used to present text in a more readable form. Different types of lists are as follows:

  • Ordered Lists
  • Unordered Lists
  • Definition lists

Ordered List in HTML

An ordered list is a list item in which each item is marked with a number or letter. An ordered list is also known as a numbered list. <ol> tag is used to create an ordered list. It stands for an ordered list. <li> tag used with each item in the list. It stands for the list item. </ol> tag is used to close an ordered list.

Attributes:

Some important attributes of the ordered list are as follows:

AttributeDescription
TypeIt specifies the numbering scheme for the list. The default number scheme is 1,2,3….. possible schemes are:
1 for 1,2,3……..
A for A,B,C…….
a for a,b,c……..
l for l,ll,lll………
i for i,ii,iii……..
StartIt specifies the starting number of the list.
ValueIt changes the numbering sequence in the middle of the list. It is used in the tag.

Example:

<html>
	<head>
		<title>wuexerice</title>
	</head>
	<body>
		<ol type="A">
			<li>Red</li>
			<li>Green</li>
			<li>Yellow</li>
			<li>Blue</li>
		</ol>


	</body>
</html>

Output:

list in html



Unordered List in HTML

An ordered list is a list of items in which each item is marked with a symbol. An unordered list is also known as an unnumbered list. <ul> tag is used to create an unordered list. It stands for an unordered list. <li> tag is used with each item in the list. </ul> tag is used to close an unordered list.

Attributes:

Some important attributes of the unordered list are as follows:

AttributeDescription
TypeIt specifies the type of symbol to appear with each item of the list. Possible values are FILLROUND, SQUARE, DISC, CIRCLE. The default value is the circle.

Example:

<html>
	<head>
		<title>wuexerice</title>
	</head>
	<body>
		<p> My favourite Colors is:</p>
		<ul>
			<li>Yellow</i>
			<li>Red</li>
			<li>Blue</li>
		</ul>

	</body>
</html>

Output

My favorite Colors is:

  • Yellow
  • Red
  • Blue

Definition List in HTML

This definition list is not a list of items. A definition list is used to define the list of the item. When an item has some description then we use the definition list. It consists of terms and descriptions of terms. <dl> tag is used to create a definition list. It stands for the definition list. <dt> tag is used with each term in the definition list. It stands for definition term. <dd> tag is used with each description of the term. It stands for definition description.

Example:

<html>
	<head>
		<title>wuexerice</title>
	</head>
	<body>
		<dl>
			<dt>HTML</dt>
			<dd>Html is used for designing the website structure.</dd>
		</dl>
	</body>
</html>

Output

HTML
HTML is used for designing the website structure.

Nested List in HTML

A list within a list is known as nested lists. A list is display in a list is called the nested list. HTML can display items as nested lists. A nested list is a combination of different types of lists. For example, an ordered list can be nested within an unordered list. If we create a list into a list than we called this is a nested list.

Example

<html>
	<head>
		<title>wuexerice</title>
	</head>
	<body>
		<ul type=”square”>
			<li>item no 1</li>
			<li>item no 2</li>
			<ol type="l">
				<li>sub item no 1</li>
				<li>sub item no 2</li>
			</ol>
			<li>item no 3</li>
			</il>
		</ul>
	</body>
</html>

Reference

If you want to learn more about HTML then visit the official website: Visit

Visit the HTML tutorial list. And make strong your HTML concept. Click here. wuschools.com is always written about the HTML concept for the HTML lover. Ang writes about how HTML makes your life easy if you are a web site developer. We help you to continue your learning.

Leave a Reply

Close Menu