Saturday, September 10, 2011

07 - Listing


List


 There are two types of List in Html.
  1. Ordered list
  2. Unordered list
Unordered List.
An Unordered list starts with the <ul> tag and end with </ul> tag.
List contains list items <li> </li>. For example

Open Text Editor and type.

<html>
<body>
<h1> Unrdered List</h1>
<ul>
<li>html</li>
<li>xml</li>
</ul> 
</body>
</html>

Save the file as Unordered.html
Open file in browser(internet explorer, firefox )

Output
 
  • html
  • xml
Unorderlist Type:
We can also specify the list type. For example.
  1. <li type = “disc”>html</li>
  2. <li type = “circle”>xml</li>
  3. <li type = “square”>css</li>
Ordered List:

An Ordered list starts with the <ol> tag and end with </ol> tag.
List contains list items <li> </li>. For example

Open Text Editor and type.

<html>
<body>
<h1> Ordered List</h1>
<ol>
<li>html</li>
<li>xml</li>
</ol> 
</body>
</html>
Save the file as Ordered.html
Open file in browser(internet explorer, firefox )

Output
  1. html
  2. xml

Ordered List Type
We can also specify the list type. For example.

  1. <li type = “A”>html</li>
  2. <li type = “a”>xml</li>
  3. <li type = “1”>css</li>
  4. <li type = “i”>javascript</li>
  5. <li type = “I”>php</li>

HTML Definition Lists:
A definition list is a list of items, with a description of each item.

 The <dl> tag defines a definition list.
The <dl> tag is used in conjunction with <dt> (defines the item in the list) and <dd> (describes the item in the list):

<html>
<body>
<dl>
<dt>html</dt>
<dd>- for creating web pages</dd>
<dt>photoshop</dt>
<dd>- for image editing</dd>
</dl>
</html>
</body>

Save the file as Ordered.html
Open file in browser(internet explorer, firefox )

Output
 

html
- for creating web pages
photoshop
- for image editing


powered by multimediagyan ©

No comments:

Post a Comment