List
There are two types of List in Html.
Unordered List.
An Unordered list starts with the <ul> tag and end with </ul> tag.
List contains list items <li> </li>. For example
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>
<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.
- <li type = “disc”>html</li>
- <li type = “circle”>xml</li>
- <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
Output
- html
- xml
Ordered List Type
We can also specify the list type. For example.
- <li type = “A”>html</li>
- <li type = “a”>xml</li>
- <li type = “1”>css</li>
- <li type = “i”>javascript</li>
- <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 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>
<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
- for creating web pages
photoshop
- for image editing
powered by multimediagyan ©
No comments:
Post a Comment