HTML Tag Reference - HTML tag <ul>








This <ul> element creates an unordered (bulleted) list. Each item in the list is, in turn, created by the <li> element.

Browser compatibility

<ul> Yes Yes Yes Yes Yes

What's new in HTML5

The "compact" and "type" attributes are deprecated in HTML5.

Attribute

Attribute Value Description
compact compact Not supported in HTML5.
Set that the list should render smaller than normal
type disc
square
circle
Not supported in HTML5.
Set the marker type




Global Attributes

The <ul> tag supports the Global Attributes in HTML.

Event Attributes

The <ul> tag supports the Event Attributes in HTML.

Default CSS Settings

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




Example

<html>
<body>
     <ul>
          <li>Africa</li>
          <li>Antarctica</li>
          <li>Asia</li>
          <li>America</li>
          <li>Europe</li>
     </ul><!--from  ww w.  ja v a2s  . co  m-->
</body>
</html>

Click to view the demo