Select Chapter ❯
HTML Tutorial
- HTML Introduction
- HTML Editors
- HTML Main Tags
- HTML All Tags
- HTML Attributes
- HTML Formating
- HTML Comments
- HTML Links
- HTML Images
- HTML Tables
- HTML List
- HTML Iframes
- HTML Style
- HTML Javascript
- HTML Forms
- HTML Elements
HTML5 Tutorial
HTML Media
HTML List
HTML has three kinds of lists.
- <ol>It is called Ordered list it uses different schemes of numerals to list items.
- <ul>It is called Unordered list it use bullets to list items.
- <dl>It is called defination list it use to display data in defination style.
Ordered List (<ol>)
Ordered list uses various type of letters,numerals to list your data instead of bullets.
It uses type and start attribute to display list in different numerals.
- type="1"Default numeral
- type="I"Uppercase numeral
- type="i"Lowercase numeral
- type="A"Uppercase letter
- type="a"Lowercase letter
Example of <ol>
<ol type="1" start="2"> <li>Apple</li> </ol> <ol type="I" start="2"> <li>Banana</li> </ol> <ol type="i" start="2"> <li>Mango</li> </ol> <ol type="A" start="2"> <li>Carrot</li> </ol> <ol type="a" start="2"> <li>Orange</li> </ol>
Result of the above example
- Apple
- Banana
- Mango
- Carrot
- Orange
Unordered List (<ul>)
Unordered list uses different types of bullets to list your data.
It uses type attribute to display list in different bullets.
- type="square"
- type="disc"
- type="circle"
Example of <ul>
<ul type="square"> <li>Apple</li> </ul> <ul type="disc"> <li>Banana</li> </ul> <ul type="circle"> <li>Mango</li> </ul>
Result of the above example
- Apple
- Banana
- Mango
Defination List(<dl>)
It is used to represent data in defination style it consist of two more tags:
- <dt>It is called the term.
- <dd>It is called the term defination.
Example of <dl>
<dl> <dt>HTML</dt> <dd>It is Hyper Text Markup Language</dd> <dt>CSS</dt> <dd>It is Cascading Style Sheet</dd> </dl>
Result of the above Example
- HTML
- It is Hyper Text Markup Language
- CSS
- It is Cascading Style Sheet
❮ PreviousNext ❯