10 ListsContents
ListsContents
<ol>: The Ordered List elementThe <ol> HTML element represents an ordered list of items — typically rendered as a numbered list.
<li>: The List Item elementThe <li> HTML element is used to represent an item in a list. It must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.
HTML ListsIn this tutorial you will learn how to create different types of lists in HTML. HTML ListsIn this article, we will know the HTML List, along with understanding its types, various ways to implement them, through the example. A list is a record of short pieces of related information or used to display the data or any information in web pages in the ordered or unordered form. For instance, to purchase the items, we need to prepare a list that can either be ordered or unordered list which helps us to organize the data & easy to find the item. Please refer to the HTML <li> type Attribute article for the various types of attributes that can be used with the ordered & unordered list. Example: The below example illustrates the use of the unordered & ordered list in HTML. HTML
Output: HTML List Supported Tags: These tags are used in HTML listing.
The HTML Unordered List: An unordered list starts with the “ul” tag. Each list item starts with the “li” tag. The list items are marked with bullets i.e small black circles by default. Syntax: <ul> list of items </ul>Attribute: This tag contains two attributes which are listed below:
Note: The <ul> attributes are not supported by HTML5. Example: This example describes the unordered list. HTML
Output: Unordered List HTML unordered list has various list item markers: Example 1: The Disc can be used to set the list item marker to a bullet i.e default. HTML
Output: Unordered List with disc item maker Example 2: The Circle can be used toset the list item marker to a circle. HTML
Output: Unordered List with circle item maker Example 3: TheSquare can be used to set the list item marker to a square. HTML
Output: Unordered List with square item maker Example 4: It’s none that can be used to set the list item marker with no mark. HTML
Output: Unordered List with none item maker Example: Nested Unordered List, It is used to nest the list items ie., list inside another list. HTML
Output: Nested Unordered List HTML Ordered List: An ordered list starts with the “ol” tag. Each list item starts with the “li” tag. The list items are marked with numbers by default. Syntax: <ol> <li>Item1</li> <li>Item2</li> <li>Item3</li> </ol>Attributes:
Example:This example illustrates the use of the reverse attribute, control list counting & type attribute. HTML
Output: Ordered List with different list style HTML ordered list has various list item markers: The type attribute of the <ol> tag defines the type of the list item marker. Example 1: The list items will be numbered with numbers i.e default. HTML
Output: Ordered List withnumeric item maker Example 2: Type=”A”, this list of items will be numbered with uppercase letters. HTML
Output: Ordered List withcapital alphabetic item maker Example 3: Type=”a”, this list items will be numbered with lowercase letters. HTML
Output: Ordered List withsmall alphabetic item maker Example 4: Type=”I”, this list items will be numbered with uppercase roman numbers. HTML
Output: Ordered List withuppercase roman numbers Example 5: Type=”i”, this list items will be numbered with lowercase roman numbers. HTML
Output: Ordered List withlowercase roman numbers Example 6: Nested ordered list, a nested ordered list is a list that has a list inside another list. HTML
Output: Nested Ordered List HTML Description List: A description list is a list of terms, with a description of each term.The <dl> tag defines the description list, the <dt> tag defines the term name, and the <dd> tag describes each term.Please refer to the How to add description list of an element using HTML? article for further details. Syntax: <dl> Contents... </dl>Example: This example describes the HTML Description List. html
Output: Description List Supported Browser:
Article Tags :
HTML Technical Scripter Web Technologies
HTML-Basics Practice Tags :
HTML HTML | <li> type AttributeThe <li> type attribute in HTML is used to specify the type of a list items. This attribute also defines the style of the bullet point of the list items. Syntax: <li type="1|a|A|i|I|disc|circle|square">Attribute Values:
For unordered list items:
Note: The <li> type attribute is not supported by HTML 5. Example 1: HTML
Output: Example 2: HTML
Output: Supported Browsers: The browser supported by HTML <li> type attribute are listed below:
Article Tags :
HTML Web Technologies
HTML-Attributes Practice Tags :
HTML HTML Lists
❮ Previous
Next ❯
HTML lists allow web developers to group a set of related items in lists. ExampleAn unordered HTML list:
An ordered HTML list:
|