<ul> - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:ul

Introduction

The ul element creates unordered lists.

Items in the ul element are denoted using the li element.

The ul Element summary

Item Value
Element ul
Local AttributesNone
ContentsZero or more li elements
Tag Style Start and end tag
New in HTML5No
Changes in HTML5 The type and compact attributes are obsolete

Style Convention

ul {
   display: block;
   list-style-type: disc;
   margin-before: 1em;
   margin-after: 1em;
   margin-start: 0;
   margin-end: 0;
   padding-start: 40px;
}

Using the ul Element

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
   </head> 
   <body>
       I like: <!--from  w  w w .j  a  v  a2 s  .co m-->
      <ul> 
         <li>CSS</li> 
         <li>HTML</li> 
         <li>Code</li> 
         <li>Java</li> 
         <li>SQL</li> 
         <li>C</li> 
      </ul>  
   </body>
</html>

Related Tutorials