Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML
  • tag
  • HTML
  • tag
  • Example

    Two HTML list examples: an ordered list (

      ) and an unordered list (
        ) :

           

        1. Coffee
        2.  

        3. Tea
        4.  

        5. Milk

           

        • Coffee
        •  

        • Tea
        •  

        • Milk

        Try it »

        (See more examples at the bottom of this page)


        Browser support

        Internet Explorer Firefox Opera Google Chrome Safari

        Currently most major browsers support the

      • tag.


        Tag Definition and Usage Notes

      • tag, which defines a list item.
      • The tag can be used in ordered lists ([
          ](tag-ol.html)), unordered lists ([
            ](tag-ul.html)), and menu lists ([ ](tag-menu.html)).

            Differences between HTML 4.01 and HTML5

            The "type" attribute was deprecated in HTML 4.01 and is not supported in HTML5.

            The "value" attribute was deprecated in HTML 4.01 and is not supported in HTML5.


            Tips and Notes

            **Tip: ** Use CSS to define the type of lists and list items.


            property

            property Value Description
            type 1
             A       
            
             a       
            
             I       
            
             i       
            
             disc       
            
             square       
            
             circle | HTML5 does not support该属性。HTML 4.01 已废弃该属性。 不赞成使用。请使用样式取代它。 Specifies使用哪种项目符号。 |
            
            

            | value | number | Deprecated. Use styles instead. Specifies the number of the list item. |


            Global Attributes

          • The tag supports global attributes; see the full list in [HTML Global Attributes](/tags/ref-standardattributes.html).

            Event attribute

          • The tag supports all [HTML Event Attributes](/tags/ref-eventattributes.html).

            Online example

            A nested list
            A list inside a list.

            Another nested list
            A more complex nested list.


            Related Articles

            HTML Tutorial: HTML list