<ul> tag

HTML <ul> tag

In HTML, the <ul> tag creates an unordered list.

By default, the items under an unordered list are bullet points so it is also called as bulleted list.

To create the list of items inside the unordered list, you should use the <li> tag. 

<ul>list elements…</ul>



CSS Default Values

display: block;
list-style-type: disc;
margin-top: 1em;
margin-bottom: 1 em;
margin-left: 0;
margin-right: 0;
padding-left: 40px;

How Browser will display


Difference between HTML4.01, XHTML and HTML5

None None In HTML5, the compact and type attributes are deprecated.

Attributes used with <ul> tag

Attribute Description
type To define the type of marker for the items of the unordered list. This tag can take any one of these values -
  • disc - Default value
  • circle
  • square
  • (HTML5 does not support the <type> attribute). It is better to use CSS.
    compact To make the list compact. This makes the list appear smaller than the normal size.
    (HTML5 does not support the <compact> attribute)

    Global Attributes

    The <ul> tag supports Global attributes.

    Event Attributes

    The <ul> tag supports Event attributes.

    Supporting Browsers

    supporting-browsers for tags

    Related Tags

    <ol> and  <li> tags.

    Tutorials for all brains!