CSS Lists

CSS ListsCreating lists to show information are sometimes essential, there are many types of lists and many more ways in which you can edit them. Here are some of the types of lists you can create.

Ordered Lists

  1. Object 1
  2. Object 2
  3. Object 3
  4. Object 4
  5. Object 5

Unordered Lists

  • Object 1
  • Object 2
  • Object 3
  • Object 4
  • Object 5

On the unordered list you can see instead of each list object being numbered they have a dot (bullet) at the beginning at each one. So how are these made?

Ordered List Code

<ol> <!-- Ordered List --->
<li>Object 1</li>
<li>Object 2</li>
<li>Object 3</li>
<li>Object 4</li>
<li>Object 5</li>
</ol>

Unordered List Code

<ul> <!-- Unordered List --->
<li>Object 1</li>
<li>Object 2</li>
<li>Object 3</li>
<li>Object 4</li>
<li>Object 5</li>
</ul>

Now lets use a bit of CSS to customize our list shall we? What if you don't want bullets at the beginning of each list? Say you want squares. To do this we are going to use internal CSS.

<ul id="squares"> <!-- Unordered List With Squares--->
<li>Object 1</li>
<li>Object 2</li>
<li>Object 3</li>
<li>Object 4</li>
<li>Object 5</li>
</ul>

And your CSS would be:

#squares li {
list-style-type: square;
}

These together would give you:

image 1

Other possible values for list-style-type are as follows:-

  • disc
  • circle
  • square
  • decimal
  • lower-roman
  • upper-roman
  • lower-alpha
  • upper-alpha
  • none

Why not try them out and see which one suits you best. Remember, there are much more you can do to customize these lists, check out my CSS section for more.


Close    To Top
  • Prev Article-Web Design:
  • Next Article-Web Design:
  • Now: Tutorial for Web and Software Design > Web Design > HTMLCSS > Web Design Content
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Geek Tutorial
     

    Blogging Tutorial

      RSS Tutorial
      Podcasting Tutorial
    Graphic Design Tutorial
      Coreldraw Tutorial
      Illustrator Tutorial
      3D Tutorials
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial/ Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial/ Articles
     

    XML Style

      AJAX Tutorial
      XML Mobile
    Flash Tutorial/ Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial/ Articles
      Linux Tutorial
      Symbian Tutorial
      MacOS Tutorial
    Personal Tech
      Hardware Tutorial
      Software Tutorial
      Online Auction