C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
HTML Unordered List | HTML Bulleted ListHTML Unordered List or Bulleted List displays elements in bulleted format . We can use unordered list where we do not need to display items in any particular order. The HTML ul tag is used for the unordered list. There can be 4 types of bulleted list:
To represent different ordered lists, there are 4 types of attributes in <ul> tag.
HTML Unordered List Example<ul> <li>HTML</li> <li>Java</li> <li>JavaScript</li> <li>SQL</li> </ul> Output:
ul type="circle"<ul type="circle"> <li>HTML</li> <li>Java</li> <li>JavaScript</li> <li>SQL</li> </ul> Output:
ul type="square"<ul type="square"> <li>HTML</li> <li>Java</li> <li>JavaScript</li> <li>SQL</li> </ul> Output:
ul type="none"<ul type="none"> <li>HTML</li> <li>Java</li> <li>JavaScript</li> <li>SQL</li> </ul> Output:
Note: The type attribute is not supported in HTML5, instead of type you can use CSS property of list-style-type. Following is the example to show the CSS property for ul tag.<ul style="list-style-type: square;"> <li>HTML</li> <li>Java</li> <li>JavaScript</li> <li>SQL</li> </ul> Code: <!DOCTYPE html> <html> <head> </head> <body> <h2>The type attribute with CSS property</h2> <ul style="list-style-type: square;"> <li>HTML</li> <li>Java</li> <li>JavaScript</li> <li>SQL</li> </ul> </body> </html> Output: Supporting Browsers
Next TopicHTML var Tag
|