MENU

Thursday, 21 April 2022

HTML Lists

 HTML Lists

HTML Lists are used to specify lists of information. All lists may contain one or more list elements. There are three different types of HTML lists:


1. Ordered List or Numbered List (ol)

2. Unordered List or Bulleted List (ul)

3.  List or Definition List (dl)


1. Unordered HTML List

An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.

The list items will be marked with bullets (small black circles) by default:

 Ex :

 <ol> 

 <li>Akash</li>  

 <li>Uday</li>  

<li>Ram</li>  

<li>Akhil</li> 

</ol>  

 Output :

Akash

Uday

Ram

 Akhil

2. Ordered HTML List

An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.

The list items will be marked with numbers by default:

 Ex :

 <ul> 

 <li>Akash</li>  

 <li>Uday</li>  

<li>Ram</li>  

<li>Akhil</li> 

</ul>  

 Output :

Akash

Uday

Ram

 Akhil

3. HTML Description Lists

HTML also supports description lists.

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)T

The <dd> tag describes each term

 Ex :

<dl> 

<dt>Aries</dt>  

<dd>-One of the 12 horoscope sign.</dd>  

<dt>Bingo</dt>  

 <dd>-One of my evening snacks</dd>  

<dt>Leo</dt>  

<dd>-It is also an one of the 12 horoscope sign.</dd>  

<dt>Oracle</dt>  

 <dd>-It is a multinational technology corporation.</dd>   

</dl>  

0 comments:

Post a Comment

LATEST

PROGRAMMING LANGUAGES

WEB TECHNOLOGIES

DBMS

C

C++

PREPARATION

LATAST POSTS

Top