Help:Categorization

This article provides guidelines on creating and organizing categories.

When to use categories
Every page in the article namespace should have at least one category. Categories should be on major topics that are likely to be useful to someone reading the article.


 * Article: Enki
 * Useful category: Category:Sumerian dieties
 * Not useful: Category:Dieties whose names start with E

Questions to ask to know if a category is the appropriate tool:


 * Is it possible to write a few paragraphs or more on the subject of a category, explaining it?
 * If you go to the article from the category, will it be obvious why it's there? Is the category subject prominently discussed in the article?

If the answer to either of these questions is no, then a category is probably inappropriate.

An article will often be in several categories. Restraint should be used, however &mdash; categories become less effective the more there are on a given article.

An article should not be in both a category and its subcategory. An article with the same name as a category should usually belong only to that category.

Categories appear without annotations, so be careful of NPOV when creating or filling categories. Unless it is self-evident and uncontroversial that something belongs in a category, it should not be put into a category.

Exceptions to the above rules are categories such as Stub categories which are intended to aid the function of Wikipedia editing.

For articles without any stable category, Special:Uncategorizedpages exists to direct attention to them.

Categories do not form a tree
Each article can appear in more than one category, and each category can appear in more than one parent category. Multiple categorization schemes co-exist simultaneously. In other words, categories do not form a strict hierarchy or tree structure, but a more general directed acyclic graph (or close to it, see below).

Nevertheless, parts of the category graph will be tree-like, and it may be convenient to think of parts of the category graph as being like multiple overlapping trees.

Cycles should usually be avoided
Although the MediaWiki software does not prevent cycles (loops), these should usually be avoided.

How to create categories
Creating a category is as simple as adding a soft link to the appropriate article in the Category: namespace; for instance, to add an article called "Felis silvestris catus" to the "fluffy creatures" category, you would edit the article and enter   at the bottom. Although the link will not appear in the article text, a page called Category:Fluffy creatures will automatically list alphabetically all articles that contain the   link. The appeal of categories is that unlike lists, they update themselves automatically, and that one can use them to quickly find related articles. However, categories are not a substitute for lists, and you will find that many articles belong to both lists and categories. You may see some inconsistencies when first creating the category: it may alternate between appearing empty and appearing with your first additions. It will probably correct itself in a few minutes.

Note that, although "uncreated" categories will correctly list articles that have been assigned to them, the category page itself does not exist until it is manually created. The easiest way to create the category page is to follow the edit link from an article and add a parent category and a category description as explained below.

Creating subcategories
Create subcategory pages by putting the name of the parent category on a category page that you would like to be the subcategory. Child categories (subcategories) are created by putting on the lower-level category pages. For example, on a (sub)category page called category:Roses you put, Roses becomes a subcategory of Flowers.

When adding an article to a category, or creating categories, one should be careful to use the correct categories and subcategories. Horizontal categorization, directly below, refers to placing an article in the correct category while vertical categorization refers to placing an article in the correct subcategory.

When assigning an article into categories, try to be thorough in a "horizontal" sense. The topic may be associated with a geographic area, a historical period, an academic subfield, a certain type of thing (like a food or an ornament), and/or a special interest topic (like Roman Empire or LBGT). You might need to poke around the category hierarchy a bit to find the right place. Try searching for articles similar to the article you are categorizing to get ideas or to find the most appropriate place. (For instance, '4th millennium BCE' is more correctly in 'Category:Periods' rather than 'Category:Places'.)

In the "vertical" dimension, you should probably be more frugal. A good general rule is that articles should be placed in the most specific categories they reasonably fit in.

Whatever categories you add, make sure they do not implicitly violate the neutral point of view policy. If the nature of something is in dispute (like whether or not it's fictional or scientific or whatever), you may want to avoid labelling it or mark the categorization as disputed. Most categorizations are pretty straightforward, though.

Category membership and creation
When writing the description for a category, give it a parent category. In fact, you should try to give it at least two parent categories. For example, Category:Judaism should be in both Category:Religion and Category:Israel. A few categories do only merely subdivide their parent category, but unless the parent category has many potential articles under it, or many potential subdivisions, if you can't think of a second parent category, it might be a better idea to fold your smaller category into the parent.

User namespace
Categories relating to the User namespace should be added only to Wiki-specific categories. Users should not add their user pages to article namespace categories such as Category:People or other subcategories, Category:Sumerologists etc, which are reserved for pages in the article namespace. See m:Help:Category.

If you copy an article to your user namespace (for example, as a temporary draft or in response to an edit war) you should decategorize it.

Image namespace
See categorizing images.

General naming conventions

 * For a pre-existing category, the article of the same or similar name and (rarely, or) on the same topic should be added to that category. When creating an article one should, only if appropriate (especially horizontally), create a category of the same or similar name on the same topic.
 * Articles should be placed in the most specific categories possible. Categories should be more or equally as broad as the articles they contain; articles should be more or equally specific as the categories they are in.
 * Avoid abbreviations. Example: "World War II equipment", not "WW2 equipment".
 * Don't hard-code the category structure into names. Example: "Monarchs", not "People - Monarchs".
 * Choose category names that are able to stand alone, independent of the way a category is connected to other categories. Example: "Babylonian literature", not "literature" (a subcategory of "Babylon").
 * Topical category names should be singular. Examples: "Sumerology".
 * Standard naming conventions apply; in particular, do not capitalise regular nouns.
 * As with lists avoid descriptive adjectives such as famous, important, or notable in category titles.

User browsing
Categories (along with other features, like cross-references) should help users find the information they are looking for as quickly as possible, even if they don't know that it exists or what it's called.

Links to categories
You can create a link to a category page without adding the page to that category by using a colon before the word Category. Example:  Category:Judaism  appears as Category:Judaism.

Redirected categories
Although it is possible to attempt to redirect categories by adding a line such as  #REDIRECT Category:Judaism  to a category, it is not generally recommended because of limitations in the mediawiki software. Categories "redirected" in this way do not prevent the addition of articles to the redirected category. Articles added to the "redirected" category do not show up as in the target category. Until these issues are addressed (in future versions of the software), #REDIRECT should not be added to category pages.

Category sorting
Contrary to some expectations, text after a pipe ("|") in a category link is not used in place of the category text. Rather, this text is used as the sort key on the category page itself. However, again contrary to expectations, that sort text is not displayed.

Using this method to sort category entries is sometimes informally referred to as the pipe trick. However, this use of the pipe character is very different from the original Wikimedia pipe trick which allows one to easily hide parenthetical disambiguation in links.

It is possible to force an article or subcategory to the top of the list by using a non-alphanumeric character as the first after the pipe. For example, using   (note the space) or    would force that article to be displayed before all the others.

Year categories
In categories which are years or periods, such as Category:4th millennium BCE, special sorting guidelines apply:
 * Entries should generally be sorted by topic, so the article 4th millenniumBCE historical events, for example, would contain the category reference  </tt>.
 * The article about the year or period itself, 4th millennium BCE, should be sorted first among all articles by using  </tt>.