Know about HTML Lists

Check HTML Lists from Coding section on e akhabaar

A webpage is sorted and indexed as one of the best ways to present information. Two kinds of lists can be be made through HTML.

  • Ordered List
  • Unordered List

Unordered Lists

< ul type = “disc/circle/square”>
  • …….
  • …….
  • …….
  • …….
  • type = “disc” sets a solid disc. type = “circle” sets an empty circle. type = “square” sets a solid square.

    Example 1

    
    
    • UP
    • Punjab
    • Haryana
    • MP

    Output

    • UP
    • Punjab
    • Haryana
    • MP

    Example 2

    
    
    • UP
    • Punjab
    • Haryana
    • MP

    Output

    O UP

    O Punjab

    O Haryana

    O MP

    Ordered Lists

    1. ………
    2. ………
    3. ………
    4. ………

    type = “1” sets a sequence numbers. type = “A” sets sequence uppercase letter A, B, C..  type = “a” sets sequence lowercase letter a,b,c…

    Example

    
    
    1. UP
    2. Punjab
    3. Haryana
    4. MP

    Output

    1. UP
    2. Punjab
    3. Haryana
    4. MP

    Example

    
    
    1. UP
    2. Punjab
    3. Haryana
    4. MP

    Output

    A.UP

    B.Punjab

    C.Haryana

    D.MP

    Example

    
    
    1. UP
    2. Punjab
    3. Haryana
    4. MP

    Output

    a.UP

    b.Punjab

    c.Haryana

    d.MP

    Definition Lists

    ……..
    …….
    ……..
    …….
    ……..
    …….

    includes all definition list items

    includes all the first layer of list items.

    includes all the second layer of list items

    Example

    
    
    AAAA
    These are A letters
    BBBB
    These are B letters
    CCCC
    These are C letters

    Output

    AAAA

             These are A letters

    BBBB

              These are B letters

    CCCC

              These are C Letters

    Explanation

    contains all definition lists items.

    AAAA

    contains the first layer of list items “AAAA”.

    These are A letters

    contains the second layer of list items “These are A letters”.

    Unordered Lists Style

    Unordered lists ca set the CSS style by its id, class or tag name.

    .classattribute:value

    Example