When we use HTML Lists elements in html code the web browser show our text in a bulleted form by default.Actually there are three HTML Lists Type Unordered List(bulleted),Ordered Lists(numbers) and Definition List(think:dictionaries) .
But the most HTML Lists are Ordered and Unordered Lists and these are given below:
HTML Lists
Ordered List:
- I am list 1
- I am list 2
- I am list 3
Unordered List:
- I am list 1
- I am list 2
- I am list 3
HTML List Code
Here i want to show you how to use HTML list
Here is the example
Example:
Example:
<body> <ul> <li>This is a list item one</li> <li>This is a list item two</li> <li>this is a list item three</li> </ul> </body>
Your Result:
HTML-Ordered List
When we use HTML lists elements Start with<ul> and close</ul> tags actually we signifies the web browser
hey here is html ordered list code then the web browser convert this into bullet form like a (black circle) full disk thats all.Here i show you with example,
Example:
<h4 align="center">My shopping List</h4> <ul> <li>Butter</li> <li>Milk</li> <li>Cereal</li> <li>Cooking Oil</li> </ul>
Your Result:
To change the bullet into disk or any other style we make changes in<ul> by adding the type attribute like here<ul type="disk">.Here is the Unordered type lists
Example:(types of Unordered lists)
<ul type="square"> <ul type="disc"> <ul type="circle">
Your Result:
Here is the result in a web browser.
type="square"| | type="disc"| | type="circle"| |
|
|
|
HTML Ordered Lists
HTML ordered List tags are start with <ol> and end with </ol> tags and we write the code inside of an ordered list and the result is shown with the numbers instead of bullets.
Example:
<h4 align="center">Peoples Aim</h4> <ol> <li>Good Job</li> <li>Good Money</li> <li>Move Out</li> </ol>
Your Result:
If wer want to change the numbering into different type we can also change in to different form here is the example,
Example:(types of ordered list)
<ol type="a"> <ol type="A"> <ol type="i"> <ol type="I">
Your Results:
Lower-Case Letters| | Upper-Case Letters| | Lower-Case Numerals| | Upper-Case Numerals| |
|
|
|
|
An HTML definition list<dl> is a list of items,and we add some description for each item
<dl>-tag define the definition list
and we use the <dl> tag for conjunction with <dt> and <dd>(describe the item in the list).Here is the example.
<dl> <dt><b>Drink</b></dt> <dd>black hot drink</dd> <dt><b>Milk</b></dt> <dd>Cold drink</dd> </dt> </dl>
Your Result:
Drink
black hot drink.Milk
cold drink.
No comments:
Post a Comment