HTML ul Tag for Unordered List Bullets

Updated on 13 Feb 2012,
Published on 11 Jul 2008

The HTML ul unordered list tag is used to display the list of items with bullets instead of numbers like in HTML ol ordered lists in html document. The pair of HTML <ul> and </ul> tags enclose the block of unordered list items. HTML li tag is a common tag used to render the list items of unordered list as well as other types of HTML list tags such as ordered list ol tag. According to old style HTML doctype standards you can use unpaired HTML li tag. But now according to W3C new standards for valid HTML and XHTML each tag must have paired closing tag. So while using HTML lists you must also use paired tag for HTML li tag as <li> and </li>.

HTML Examples:

You can see the live samples and examples of HTML Basic tags from the following links:

HTML unordered list can be rendered with different forms of bullets. Different types of HTML Unordered Listing Bullets are:

  • Circle
  • Disc
  • Square

HTML Code for Unordered List using HTML ul and li tag

<ul>
    <li>list item 1</li>
    <li>list item 2</li>
    <li>list item 3</li>
    <li>list item n</li>
</ul>

You can add unlimited number of items in HTML unordered list using paired HTML li tag inside the HTML ul tag.

HTML ul Unordered List Tag Attributes

The HTML ul tag for unordered list consists of 2 attributes:

1. compact:

compact attribute of HTML ul tag takes value equal to "compact" that directs the web browser to use less space for unordered list.

2. type:

type attribute of HMTL ul tag accepts value as circle, disc or square. Each type attribute value displays the different type of bullet in front of each list item of unordered listing.

You can also use CSS style properties to change the look and feel of fonts and bullets. Color CSS style property changes the color of text as well as bullet. List-style-type CSS property can convert the bullets into numeric decimal, roman or alphabet styles also.

Output:

You can see the output of above discussed sample code from the following link:

HTML Unordered List Tag

Continue to next tutorial: HTML ul bullet li Tag for Unordered List to learn about HTML ul and li attributes with the help of examples.

0 Responses to "HTML ul Tag for Unordered List Bullets"
Leave a Comment
* required
* required
* will not be published
* optional
* hint: http://www.example.com
  • Subscribe via Email
  • HIRE EzineASP.Net Developers