Lists in HTML

What is List?

List is a group of items related to each other.

Typed of list in html

  1. Unordered list
  2. Ordered list
  3. Defination list

Unordered V/S Ordered List


Unordered list

  1. Unordered list is a group of related items arrange in no order.
  2. Order list is created by using <ul> </ul> tag.
  3. <li> </li> tag is used to create list items in the list.

Creating Unordered List

Sample output of unordered list
<ul>
       <li>Tea</li>
       <li>Coffee</li>
       <li>Cold Drink</li>
</ul>


Types of Unordered List

Types of unordered list

Ordered List

  1. Ordered list is a group of elements a particular order.
  2. <ol> </ol> tag is used to create ordered list.
<ol>
Sample output of the ordered list

     <li>Tea</li>
     <li>Coffee</li>
     <li>Cold Drink</li>
</ol>



Types of ordered list

Types of ordered list

Examples of ordered list

Ordered List Examples

Ordered list example with roman numbering

Definition List

Definition list a group of items with key (terms) and value (definition) pair.

  1. <dl> tag is used to create definition list.
  2. <dt> tag creates definition term.
  3. <dd> tag creates definition data 

Creating definition list 

<dl>
    <lh>Definition Header</lh>

    <dt>Term-1</dt>
    <dd>This is the definition of the first term</dd>

    <dt>Definition Term-2</dt>
    <dd>This is the definition of the second term</dd>
</dl>


Watch Video, Lists in HTML



Comments

Popular posts from this blog

String in golang

Arrays in C Language

Literals in Java

Pointers in C Language

Inline V/S Block Level Element

Reserved Words in Java

Identifiers

Data Types in Go language

Printing in C programming

Variable Naming & Scope of Variable