Computer Science, asked by sahilkumar63, 1 year ago

write a difference between ordered list and unordered list . Explain with HTML program​

Answers

Answered by anjanajadav
1
hey here is your answer:

<ol>
Ordered list HTML can generate is an indexed list of items where the order is emphasized or really important. The ordered list in HTML is created by using the <ol> tag. By default, ordered lists are marked with numbers, such as 1, 2, 3. These HTML lists are important when you need to point out the most important information in the beginning or when the number of items in a list is essential.
Example 
<div> <div> <ol> <li>Sugar</li> <li>Salt</li>

The unordered list HTML is produced by using the <ul> tag. By default, every item in the HTML list is marked by a plain black dot. Using the HTML ul tag lets you file the important information which is (obviously) not ordered and therefore, means that the first bullet point is not necessarily the most important one.
Example 
<div> <ul> <li>Sugar</li> <li>Salt</li> <li>Bread</li> <li>Milk</li> </ul> </div>

sahilkumar63: pl write in points
anjanajadav: hey i have given numbers i,ii,iii,iv
sahilkumar63: ok but short
sahilkumar63: i wants short points
anjanajadav: but these are important so
sahilkumar63: no problem
sahilkumar63: give short points
anjanajadav: ok
anjanajadav: hey i have edited the answer see it
Answered by gururandhawa62
4
OL> Ordered List

<OL> tag is used to create ordered lists. Ordered lists are identical in behavior to unordered lists except they use numbers instead of bullets, and you can use an attribute to start numbering at a number other than one.

Attribute TYPE: (1 | a | A | i | I )

Changes the style of the list.TYPE = “1” (Arabic Numbers)TYPE = “a” (Lowercase alphanumeric)TYPE = “A” (Uppercase alphanumeric)TYPE = “i” (Lowercase Roman numbers)TYPE = .1″ (Uppercase Roman numbers)

Example

<HTML>
<HEAD>
<TITLE> Javatechig | List Example </TITLE>
</HEAD>
<BODY>
<H1> Mobile Operating System</h1>
<OL>
<LI> Android <LI> Blckberry <LI> iPhone <LI> Windows Phone </OL>
<H1>Mobile Manufacturers</h1>
<OL TYPE = "A">
<LI> Samsung <LI> HTC <LI> Micromax <LI> Apple </OL>
</BODY>
</HTML>


UL> Tag : Unordered List

Similarly, inside an unordered list < UL>, one can control the type of bullet; displayed with <TYPE>. VALUE = number changes the count of ordered lists as they progress.

To create an unordered list, you can put your content inside <UL> and </UL> tag. This creates an unordered list with bullets preceding each list item. Unordered lists can be preceded by anyone of several bullet styles; a closed circle, an open circle, or a square.

Attributes: Renders the list as compactly as possible by reducing line leading and spacing. TYPE (DISC | SQUARE | CIRCLE)

The type of bullet can be suggested with the <TYPE> attribute. The CIRCLE attribute value is used for a hollow bullet, the DISC type creates a solid bullet, and the SQUARE attribute value renders a solid block.The default appearance for a list is with a disc.You can use an optional </LI> end tag at the end of each list item.

The following example generates two separate lists;

<HTML>
<HEAD>
<TITLE> Javatechig | List Example </TITLE>
</HEAD>
<BODY>
<H1> Mobile Operating System</h1>
<UL>
<LI> Android <LI> Blckberry <LI> iPhone <LI> Windows Phone </UL>
<H1>Mobile Manufacturers</h1>
<UL TYPE = "SQUARE">
<LI> Samsung <LI> HTC <LI TYPE = "DISC"> Micromax <LI TYPE = "CIRCLE"> Apple </UL>
</BODY>
</HTML>




Similar questions