HTML Lists
HTML Lists are used to specify lists of information. There are three type of HTML Lists.
- Ordered List or Numbered List <ol>
- Unordered List or Bulleted List <ul>
- Description List or Definition List <dl>
- <li>
- <ul>
- <ol>
- <dl>
- <dd>
- <dt>
Start list item with <li> Tag and Order List start with <ol> Tag. It is also called as Numbered List. All item list marked with number by default.
Example:-
<html>
<head>
</head>
<body>
<ol>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ol>
</body>
</html>
Output:-

Unordered List or Bulleted List
Start list item with <li> Tag and Unordered List start with <ul> Tag. It is also called as Bulleted List. All item list marked with bulletes by default.
Example:-
<html>
<head>
</head>
<body>
<ul>
<li>Mumbai</li>
<li>Delhi</li>
<li>Goa</li>
<li>Hyderabad</li>
<li>Bangalore</li>
</ul>
</body>
</html>
Output:-

Description List or Definition List
HTML Description list is also a List style which is supported by HTML and XHTML. It is also known as definition List where entries are Listed like a dictionary.
Use this three tag in Description List
<dl> Tag Defines the Description list.
<dt> Tag Defines the term .
<dd> Tag Defines the term definition.
Example:-
<html>
<head>
</head>
<body>
<dl>
<dt>India</dt>
<dd>Is a Country</dd>
<dt>Maharashtra</dt>
<dd>State of India</dd>
<dt>Mumbai</dt>
<dd>Capital of Maharashtra</dd>
</dl>
</body>
</html>
Output:-

0 Comments
Post a Comment
Please do not enter any spam in the comment box.