Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: All

Bulleted or Numbered Lists

There are two types of lists: Unordered and Ordered.

An "Unordered List" command, <ul>, will set the start of a list that is indented two characters, with items started by a bullet. Like this

An "Ordered List" command, <ol>, will start the list indented one character, with each item numbered in order.

  1. Item one
  2. Item two
  3. Item three
Mark each line of either list type by preceding the line with a "List Item" command: <li>

<li> This is the first item in my list
<lt> This is the second item in my list

Depending on the list type this results in either:

or:

  1. This is the first item in my list
  2. This is the second item in my list

Different ways of listing Ordered Lists

In addition to using numbers to lead your lists, you can also use both upper and lower case letters.

If you want your "Ordered List" to be preceded by upper case "Alphabetic Characters" instead of numerals, define your list type like this <ol type="A">.

This results in a list looking like this:

  1. This is the first item in my list
  2. This is the second item in my list

If you want your list preceded by lower case letters, use a lower case "a" like this <ol type="a">.

This results in a list looking like this:

  1. This is the first item in my list
  2. This is the second item in my list

You must complete the list with the off switch </ul> for unordered lists or </ol> for ordered lists.

Types of Unordered Lists

You can use three different leading bullets in an Unordered List: Disk (the default), Circle, or Square.

Defining the type of an "Unordered List" is done like this <ul type="disk">

This makes a list with the default round, filled in bullet looking like this:

Using a type like this <ul type="circle">.

This results in a list looking like this:

And finally, using a type like this <ul type="square">.

This results in a list looking like this:

This can get complex with using nested listings:

<ul>
<li>This is the first main item in my list
<li>This is a second main item in my list
<ul>
<li>This is the first sub-item in my list
<li>This is the second sub-item in my list
</ul>
</li>
<li>This is the third main item in my list
</ul>

Results in a "Nested List"

Note: the default "Unordered List" with a disk bullet does not require the <ul> command on FreeRepublic, you can start a list at any time merely by preceding the first item with <li> but you are required to end the list with a proper </ul> before you continue entering your comment.
28 posted on 05/31/2008 11:32:07 PM PDT by Swordmaker (Remember, the proper pronunciation of IE is "AAAAIIIIIEEEEEEE!)
[ Post Reply | Private Reply | To 1 | View Replies ]


To: Swordmaker

Oh my gosh. Eight years later and I am still learning from the HTML sandbox.

This should be mandatory reading for all FReepers.


33 posted on 06/01/2008 12:09:28 AM PDT by gogov
[ Post Reply | Private Reply | To 28 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson