Unordered ListsMaking your own unordered list is straightforward. You just wrap an unordered list tag, or ul tag, around your list items, which use li tags. This will create a list of related items without being in a particular order. Show Ordered ListsTo turn our unordered list into an ordered one requires just changing the wrapper tag from ul (for unordered list) to an ol tag (ordered list). This will create an ordered list of related items. <!DOCTYPE html> <html> <head> <title>Ordered List</title> </head> <body> <h2>How to become a great developer:</h2> <ol> <li>Read all the content on Sabe</li> <li>Practice, practice, practice.</li> <li>Stay curious. Ask questions. Never stop learning.</li> </ol> </body> </html>HTML ListsIn this tutorial you will learn how to create different types of lists in HTML. Unordered, Ordered, and Description Lists in HTMLLists are used to store data or information in web pages in ordered or unordered form. HTML supports several types of list elements that can be included in the <BODY>tag of the document. These elements may also be nested, i.e, the onset of elements can be embedded within another. There are three types of list are available in HTML:
Now before moving to the list first of all we understands what is a list item tag. List Item tagList item tag is used to define each item of a list. Once we define list items with the <li> tag, the list appears in Web browsers in the bulleted form (by default). It is used inside both ordered and unordered list. Syntax:
Attribute of item tag: value: The value attribute of the<li> tag is used to specify the value of the first item. The value must be a number and this can be used in case of ordered list only. The subsequent list items will increment the value form the number. Syntax:
Example 1: HTML
Output: Example 2: HTML
Output: Now we will discuss all the list provided by the HTML one-by-one in detail: Ordered listAn ordered list defines a list of items in which the order of the items are matters. An ordered list is also called a number list. The ordering is given by a numbering scheme, using Arabic numbers, letters, roman numerals. Or in other words, ordered list tag is used to create ordered list. Syntax:
Attributes of ordered list: 1. reversed: This attribute is used to specifies that the ordered of the list should be reversed. Syntax:
2. start: This attribute is used to specifies the start value of the list. Syntax:
3. type: This attribute is used to specifies the type of list item maker. The value of this attribute is decimal(Default)/lower-roman/upper roman/lower-alpha/upper alpha Syntax:
Example 1: HTML
Output: Example 2: HTML
Output: Unordered list:An unordered list defines a list of items in which the order of the items does not. Or in other words, unordered list tag is used to create a unordered list. It is also known as bulleted list. In unordered list each element in the list is defined using <li> tag. Syntax:
Attributes of unordered list: List-style-type: This attribute is used to specifies the bullet style that will be used as the list item marker. The value of this attribute is None/disc(default)/circle/square. Syntax:
Example 1: HTML
Output: Example 2: HTML
Output: Description listDescription list is a list in which each term contain its description. This tag contain <dt> and <dd> tag.
Syntax:
Example: HTML
Output:
Article Tags :
class 7 School Learning School Programming
Ordered, Unordered & Description Lists in HTML: Definition & Examples
Lesson Transcript
Instructor:
Amit Agrawal
Show bio
Amit has a master's degree in computer applications and over 11 years of industry experience in the IT software domain.
In this lesson, you will learn about three different types of lists in HTML: ordered, unordered and description. You will also learn about the different attributes that can be used with each of these lists to change their structure.
Updated: 09/27/2021
What is an ordered and unordered list?Ordered lists, which have an inherent order and each item is numbered. Unordered lists, which have no inherent order and each item is bulleted. Description lists, which contain a list of terms and descriptions for each term. What is ordered list with example?An ordered list typically is a numbered list of items. HTML 3.0 gives you the ability to control the sequence number - to continue where the previous list left off, or to start at a particular number. |