Jump to content

User:Proteins/Basic list tutorial

From Wikipedia, the free encyclopedia

This tutorial illustrates how to add numbered lists and bullet-point lists to Wikipedia articles. NUmbered and bullet-point lists are sometimes called ordered and unordered lists, respectively, and correspond to the <OL> and <UL> tags in HTML. A third type, definition lists, will be covered in another tutorial; such lists correspond to the <DL> tags in HTML.

Numbered lists

[edit]

To put items in a numbered list, open the editing window and place a pound sign # at the beginning of the line before the item, as in the following example.

There are 10 types of people in the world:

# those who understand binary, and

# those who don't. (It's a geek joke.)

This produces the following text:

There are 10 types of people in the world:

  1. those who understand binary, and
  2. those who don't. (It's a geek joke.)

Potential mistakes

[edit]

The pound sign should be at the beginning of the line. If it's not, you'll get something like this:

 # those who understand binary, and 

Another mistake is to put a line space between the list items, which produces this:

There are 10 types of people in the world:

  1. those who understand binary, and
  1. those who don't.

It may seem as though the list items belong to one list, but they don't. The line-space creates a new list, which restarts the counting.

Bullet-point lists

[edit]

Bullet-pointed lists ar ejust like numbered lists, except that you use an asterisk instead of a pound sign. Thus, if you open an editing window and add the text

There are two types of people in the world: * cat lovers * dog lovers

you'll see the following result after saving:

There are two types of people in the world:

  • cat lovers
  • dog lovers

Again, the asterisk should be at the beginning of the line, and the list items should not be separated by a line space. The effects of a single line space are not visible, as the following example shows:

There are two types of people in the world:

  • cat lovers
  • dog lovers

However, a new unordered list is started, which makes it harder for visually impaired people to navigate the page. Do the right thing, and keep those list items together.

Combining the lists

[edit]

It's also possible to combine these two types of lists. For example, you can place an bullet-point list within a numbered list

  1. The first item
  2. The second item
    • A sublist item
    • Another sublist item
  3. The third item

Conversely, you can place a numbered list within a bullet-point list

  • The first item
  • The second item
    1. A sublist item
    2. Another sublist item
  • The third item

In both cases, the symbols occur at the beginning of the line as usual, and the list items don't have line-spaces between them.