Saturday, 1 April 2017

Lists:Help to Organize The Contents on The Web Page

Lists: 
         Lists help us to organize the contents on the web page in an ordered and sequential manner.
List Item (LI) element -The LI element is an empty element specified by <LI> tag. It is used inside OL and UL elements to define list items. Each list item has to be preceded by <LI> tag.

Syntax:
<LI> Item Name

Type of Lists:-
  • Ordered lists (numbered)
  • Unordered lists (bulleted lists)
  • Nested lists
Ordered List (OL) element -
                                                It is a container element started by <OL> tag and ended by </OL> tag. It displays a numbered list. In a numbered list each item is preceded by a number or a letter. This element is used where the items are to be placed in a specific order.

Syntax:
<OL START = "n" TYPE = "A"/"a"/"I"/"i"/"1" > 
....
......
 </OL>
Attributes of OL element:

START:-START indicates the starting number (or the serial number of the first element) of the list. This number must be a positive integer.

Syntax:
 START = "n" 
 n is a natural number.

TYPE:-TYPE defines the type of numbering sequence used for the list items.

"A" specifies a sequence of uppercase letters.
"a" specifies sequence of lowercase letters.
"I" specifies a sequence of uppercase Roman numerals.
"i" specifies a sequence of lowercase Roman numerals.
"1" specifies a sequence of numbers.

Syntax:
TYPE = "A"/"a"/"I"/"i"/"1"

Unordered List (UL) element -It is a container element started by <UL> tag and ended by </UL> tag. It displays a bulleted list. In a bulleted list each item is preceded by a small symbol called a bullet. The shape of the bullet can be a Circle, a Disk, or a Square.

Syntax: 
<UL Type="value">. . . </UL>
Attributes of UL element:

TYPE:-TYPE defines the type of bullet used for each list item. The value can be:
o CIRCLE specifies a hollow bullet.
⚫ DISC specifies a solid round bullet.
🔄 SQUARE specifies a square bullet.

Syntax: 
START = "value"

Nested lists:-Nested lists occur when we put one list inside another list. The nested list would be a list item (marked by <LI>) of the parent list.

Nested list like this:

1.What should be the first tag in any HTML document?
a. <head>         b. <title>           c. <html>         d. <document>    
                                          

2.How can you make a bulleted list?
a. <list>           b. <nl>               c. <ul>           d. <ol>             

The code for designing these web pages using LIST:         



                                            

2 comments: