List Tag
Lists Tag
List tag method that HTML specifying any information or data in list style on web page. All lists can contain one or more heading or text. In a web page list items like heading text starts with <li> and ends with </li>. list tag writing any list item, it must to specify the list type.list tag three types of lists you can use.
A list tag is a record of short pieces of related information or used to display data or any information on web pages.
The <li> tag HTML element is use to the represent item in list. list tag It must be contained in a parent element an ordered list ( <ol> )tag an unordered list ( <ul> ), or a menu ( <menu> ). list tag In menus and unordered lists items are usually.
Three Types of Lists
1) Unordered List <ul>
2) Ordered List <ol>
3)Definition List <dl>
1) Unordered List
HTML -Unordered List <ul>:- This list items using plained bullets. An unordered list is a collection of elated items that have no special order or sequence. unordered list list is created by using <ul> tag and ends with </ul> tag. unordered list each of the list is marked with bullet.unordered list can use type of attribute for <ul> tag.
<ul type="square">
<ul type="disc">
<ul type="circle">
Program
<!Doctype html>
<HTML>
<body>
<h1> Unordered List</h1>
<ul>
<li>CPU Register</li>
<li>Cache Memory</li>
<li>Primary Memory</li>
</ul>
<ul type="circle">
<li>Hard disk</li>
<li>CD/DVD</li>
<li>Pend Drive</li>
</ul>
type="square">
<li>RAM</li>
<li>SRAM</li>
<li>DRAM</li>
</body>
</html>
Unordered List Output
2) Ordered List
order list schemes different of numbers list your item. If you are require to put your item in numbered of list then HTML ordered list will be used. This list is create by using <ol> tag and ends with </ol> tag. The numbering start at one and incremented by the one for each successive ordered list element tagged with <li> tag and ends with </li>
Following are the possible options
<ol type="1"> - Default-Case Numbers.
<ol type="I"> - Upper-Case Roman Numbers.
<ol type="i"> - Lower Case Numbers.
<ol type ="a"> - Lower case Letters.
<ok type= "A"> - Lower Case Letters.
Program
<! Doctype html>
<HTML>
<body>
<h1> Ordered List</h1>
<ol type="1" start="1">
<li>Water</li>
<li>Food</li>
<li>Water</li>
</ol>
<ol type="A" start="5">
<li>Students</li>
<li>sanskar</li>
<li>Education</li>
</ol>
<ol type="I" start="5">
<li>Technology</li>
<li>Science</li>
<li>Maths</li>
</0l>
</body>
</html>
Ordered List Output
3) Definition list
Definition List <dl> HTML and XHTML support a list style which is called definition lists where entries are listed like in a dictionary or encyclopedia. definition list ideal way present glossary list of terms, or other name value list.
Program
<!DOCTYPE html>
<html>
<head>
<title> Definition List</title>
</head>
<body>
<dl>
<dt><b>HTML</b></dt>
<dd>This stands for Hyper Text Markup
Language</dd>
<dt><b>HTTP</b></dt>
<dd>This stands for Hyper Text Transfer
Protocol</dd>
</d1>
</body>
</html>
No comments:
Post a Comment