This page provides a comprehensive guide to creating and formatting lists within the MediaWiki environment (version 1.40 and onwards). Lists are essential for organizing information clearly and concisely, enhancing readability and comprehension for your wiki's users. We'll cover various list types, including bulleted lists, numbered lists, definition lists, and advanced techniques for nesting and customizing them. We will also touch upon how lists interact with other MediaWiki elements.
Lists are a fundamental element of structured writing. They break down complex information into digestible chunks, making it easier for readers to scan and understand key points. In a wiki context, lists are particularly useful for:
**Bulleted Lists:** Unordered lists, where the order of items is not significant. These are ideal for a general collection of points.
**Numbered Lists:** Ordered lists, where the order of items *is* significant (e.g., a series of steps).
**Definition Lists:** Associate terms with their definitions or descriptions.
Bulleted Lists
To create a bulleted list, use asterisks (*) at the beginning of each line. Each asterisk creates a list item.
```wiki
Item one
Item two
Item three
```
This will render as:
Item one
Item two
Item three
You can use multiple asterisks to create sub-lists (see the section on "Nesting Lists" below). The type of bullet point is generally a disc, but this can be modified with CSS (outside the scope of this help page).
Numbered Lists
To create a numbered list, use hash symbols (#) at the beginning of each line.
```wiki
First step
Second step
Third step
```
This will render as:
1. First step
2. Second step
3. Third step
Like bulleted lists, you can create sub-lists using multiple hash symbols. The numbering will automatically increment.
```wiki
Step one
Sub-step one
Sub-step two
Step two
```
This will render as:
1. Step one
1. Sub-step one
2. Sub-step two
2. Step two
You can also specify the starting number for a numbered list:
```wiki
10 First item
11 Second item
```
This will render as:
10. First item
11. Second item
Definition Lists
Definition lists are used to present a list of terms and their corresponding definitions. They use semicolons (;) for the term and colons (:) for the definition.
```wiki
Term one
Definition of term one.
Term two
Definition of term two.
```
This will render as:
Term one
Definition of term one.
Term two
Definition of term two.
Definition lists are less commonly used than bulleted or numbered lists, but they are useful for glossaries or explaining specific concepts.
Nesting Lists
Nesting lists involves placing one list inside another. This is done by increasing the indentation level. In MediaWiki, indentation is achieved using colons (:). The number of colons determines the level of nesting.
```wiki
Step one
Sub-step A
Sub-step B
Sub-sub-step 1
Sub-sub-step 2
Step two
```
This will render as:
1. Step one
* Sub-step A
* Sub-step B
1. Sub-sub-step 1
2. Sub-sub-step 2
2. Step two
You can mix bulleted and numbered lists within a nested structure. The key is to maintain consistent indentation. Notice how the indentation of the sub-sub-steps is further increased compared to the sub-steps.
List Items and Formatting
List items can contain any valid MediaWiki markup, including:
You can also add paragraphs within list items. Simply leave a blank line within the item.
```wiki
This is the first item.
This is a paragraph within the first item. It can contain multiple sentences.
This is the second item.
```
This will render as:
This is the first item.
This is a paragraph within the first item. It can contain multiple sentences.
This is the second item.
Advanced List Techniques
Using List Parameters for Customization (Limited) ==
While MediaWiki doesn’t offer extensive customization options for lists directly within the wiki markup, you can influence their appearance through CSS. This requires modifying the wiki's stylesheet, which is typically restricted to administrators. However, you can sometimes use CSS classes to target specific lists for styling. This is beyond the scope of this basic guide.
Lists within Tables ==
You can include lists within table cells, but be mindful of potential layout issues. Ensure the list is properly indented within the cell and that the table's borders and padding don't interfere with the list's formatting.
Combining Lists with Other Elements ==
Lists can be seamlessly integrated with other MediaWiki elements. For example, you can create a list of links to sections within the same page using:
This creates a list of clickable links that jump to the specified sections.
Using Templates with Lists ==
Templates can be used to dynamically generate lists. This is particularly useful for creating lists that need to be updated frequently or that are based on data stored elsewhere. See Help:Templates for more information.
Common Issues and Troubleshooting
**Incorrect Indentation:** The most common problem is incorrect indentation. Ensure that each level of nesting is indented by one additional colon.
**Unexpected Formatting:** If a list item isn't rendering as expected, check for stray colons or asterisks. Also, ensure that any internal markup is properly formatted.
**Layout Problems with Tables:** When embedding lists within tables, carefully adjust the table's width and cell padding to prevent overlapping or distorted formatting.
**Lists Not Rendering at All:** This is usually caused by an error in the wiki markup, such as a missing semicolon or colon. Double-check your syntax carefully.
**Conflicts with Other Markup:** Certain combinations of markup can cause conflicts. If you encounter a problem, try simplifying the list item to isolate the issue.
Best Practices for Using Lists
**Use lists sparingly:** Don't overuse lists. Too many lists can make a page look cluttered and difficult to read.
**Keep list items concise:** List items should be brief and to the point. If an item requires a detailed explanation, consider using a paragraph instead.
**Choose the appropriate list type:** Use bulleted lists for unordered information and numbered lists for ordered information.
**Maintain consistent formatting:** Use the same formatting for all list items within a given list.
**Test your lists:** Always preview your page to ensure that the lists are rendering correctly.
**Use descriptive link text:** When including links in list items, use descriptive link text that clearly indicates the destination.
**Consider accessibility:** Ensure that your lists are accessible to users with disabilities. Use appropriate heading levels and alternative text for images.
Resources and Further Reading
Help:Editing - General information on editing wiki pages.
Help:Links - How to create internal and external links.