Categories allow articles to be placed in one or more groups, and allow those groups to be further categorized. An article belonging to a category should contain a special link to a page that describes the category. Similarly, a sub-category belonging to a parent category should contain a special link to the parent category's page.
Each category page contains an introduction that can be edited like an article, and an automatically generated list of links to sub-categories and articles that belong to the category.
Categories do not form a strict hierarchy or tree of categories, since each article can appear in more than one category, and each category can appear in more than one parent category. This allows multiple categorization schemes to co-exist simultaneously. It is possible to construct loops in the category space, but this is discouraged.
What is the purpose of categories?
There are two main ways to use categories: sets (lists of items sharing a characteristic) and topics. When starting a subcategory, making an early decision about whether it is a set list or a topic will reduce later renames, recategorizations, and discussions. The category page can be used to tell others whether it is a set list or a topic, and to link to a main list or main article. See meta:Categorization requirements for the original purpose of the feature, and Wikipedia:Categorization for current usage and guidelines for assignment.[clarification needed]
As well as the standard links within articles themselves, every page has a link (typically at the side) called What links here.
What is the difference between a list and a category?
Grouping articles into a category is not the same as making a list of articles. To make a list of articles, you edit the list directly; but to place articles into a category, you edit each article and insert a category tag by placing [[Category:category_name]] in the body of the text. This automatically adds those articles as a list on the category's page. Despite the difference in how they are maintained, it is sometimes convenient to think of a category as a list of articles.
While an article may be in multiple lists, the goal is that browsing downwards from a list parent category, e.g. Category:People, you should only arrive at articles that are about people, e.g. John Lennon, and not related articles e.g. 251 Menlove Avenue.
There are some natural hierarchies of lists. One example is the scientific classification of organisms, which would only place an article in one category. Other systems use multiple listings, e.g. Wikipedia could be in Category:Wikis and Category:Encyclopedias.
List categories are likely to also be subcategories of topic categories.
Maintaining and tracking categories often requires more effort than a simple list. If you have a category that has vague criteria or that adds and removes members frequently, then maintaining a simple list is often more appropriate.
Further information on this topic can be found at Wikipedia:Categories, lists, and navigation templates.
A template, whose name is marked by (( before and )) after, is a collection of text and/or formatting commands, which technically exist as a page of their own. They are "called" (inserted) by placing the template name, within the braces, on a page on which that text is wanted.
A navigation template is a collection of links on a single topic, formatted in a standard way, in a box with a border. These links can be arranged in different ways within the box. The box is placed at the right or at the foot of the pages linked in it.
There are many fewer navigation templates than categories; only important topics have them. There is no requirement that a page be linked in a navigation template, whereas every page must belong to at least one category, and almost always more.
When appropriate, however, a navigation template organizes links in a far more useful way than categories do. It permits many nuances that categories can not, or can only clumsily. For the reader, a navigation template, if it exists, makes finding related articles much faster.
Templates are more complicated to create than categories, and the Wikipedian wishing to create one may want to use an existing template as a model.
Some categories exist to aid maintenance of the project, for example, template categories and redirect categories. Maintenance categories are often added by templates, ((...)), rather than by the "wikilink" structure, [[...]]. Benefits of template usage include the ability to populate more than one category with a single template, inclusion of text to explain the rationale of a given categorization(s), the ability to readily include/exclude certain pages or types of pages, and so on. Contributors may monitor these maintenance categories for many reasons to include compliance with policies and guidelines that pertain to various conventions, such as page naming conventions. Maintenance categories are usually "hidden" from view and can be seen only by registered users who have set their preferences to see hidden categories, which is easy to do:
Edit the article and add [[Category:Category name]] at the bottom of the article.
For example: [[Category:Mind-body interventions]].
How do I reference (link to) a category on a page without categorizing the page?
To link to the category page, put a colon before the word "category", inside the link, e.g. [[:Category:United States]], which will appear as Category:United States.
Where should the category tag go in the article?
Category tags should be placed at the bottom of the article, after the appendices (e.g. References and External links) and before any inter-wiki language links and stub templates (see Wikipedia:Layout). This ensures that when newcomers press "edit", they are immediately presented with the main article text, rather than the more esoteric category tags. It also ensures that the category tags are in a consistent place so they are easy to find when an editor is updating the categorization of a bunch of articles.
In what order should categories be listed within the article?
Both the alphabet and importance are used to order categories currently. Since some categories are obviously less relevant to the reader than others, categories should be ordered so that someone reading the article can use them to understand the subject, directing the reader to the categories that are most important to exploring the subject or understanding its context. Although this, like most ordering issues in Wikipedia, is a matter for judgment, it is generally clear that some categories – for example the birthplace or birth year of a person – are less important than others, such as their status as an Oscar or Nobel Prize winner. (See also Wikipedia:Categorization of people#Categorisation schemes.)
How do I sort the article differently on the category page?
This is needed especially for sorting people by surname, leaving out articles ("The" and "A") from the beginning of names, and other cases when preferred sorting key is not identical with article name; Such as grouping people with surnames starting with 'Mac' and 'Mc' together, or to force the most important articles or sub-categories to appear at the beginning of the list.
If most or all categories should be sorted in the same way, use a ((DEFAULTSORT)) tag, which looks like ((DEFAULTSORT:Smith, John)). All categories will then sort under "Smith" unless a sorting key is used for them (see below).
For individual cases use a sorting key: Expand the category notation to include the desired sorting key after a pipe sign (syntax is similar to Wikipedia:piped link, but the effect is different). For example, an article categorized by [[Category:Proper category|Sorting key]] would appear under S within the category. (See also Help:Category#Sorting category pages.)
Which categories can be used for categorization of articles on people?
Articles about people should be categorized cautiously. Unlike the body of the article, the various category choices for people can focus on what, in most cases, are common and unrelated attributes such as place of birth and gender, instead of emphasising the reason for their inclusion.
Somebody changed my categorization – what do I do?
All contributions to Wikipedia may be "edited mercilessly". If the change was not explained in the article history or talk page, try leaving a question on the relevant user's talk page. You may also change it back if you disagree.
What should I do if I see an article without any categories?
The easiest way to handle it is to add the ((Uncategorized)) template to the article, which will place a notice that the article needs categorizing, and automatically add it to the list at Category:Uncategorized pages. Or, try to categorize it yourself. One useful technique is to try following links in the article to other similar pages, and see how they are categorized, so you know what to copy.
I am interested in XYZ categories – where can I get involved?
I want to change the relationships of some categories – will anyone mind?
If you want to restructure some existing categories, it is best to discuss your plans with others working in the same areas, or at least to announce your intentions. This is to avoid the situation where someone is placing an article into multiple categories, someone else is populating a category with multiple articles and parent categories, while someone else is trying to restructure part of the category tree, and nobody ends up with what they want. A good place to start looking for an interested group of people is Category:WikiProjects.
What goes on a category page?
Category pages exist to be a convenient cross-reference to related articles and other categories.
A category page should contain a brief description of the purpose of the category.
A prominent link to the most important article in the category is usually a good idea, but please avoid copying large quantities of text or images from an article to a category page. If a category and a page have a one-to-one correspondence, then the template ((cat main)) or similar is often the best solution. Introductions should be short and only navigation templates that facilitate moving between categories or category pages can be included.
In many cases, a category has a "main article", which describes the subject of that category. The category and the article often have the same name. In such case, do this:
Add the "((cat main))" tag in the category.
Arrange for the article to appear at the top of the list of articles in the category, by putting a vertical bar and a space after the category name in the Category: tag (e.g. [[Category:''catname''| ]]).
For such a category/article pair, the guidelines for what other categories the "main article" should be in are still being worked out. Normally articles should not appear both in a category and a "parent" of that category; however an exception should be made for the "main article" of a category — the category system makes more sense if each main article appears in some or all of the categories that the equivalent category appears in. It is optimal for browsing, where the user need not keep bouncing back and forth between the categories of "main" pages and other pages.
If the subject has count, then make the category name plural and create a redirect of that same, plural name, redirecting back to the singular name. For instance City and Category:Cities. That is, create a page called "Cities" and add the line
This helps to prevent confusion by blocking others from creating a competing page that overlaps in scope and you will be able to use the cat main template without specifying any additional parameters.
In theory, if a main article is categorized correctly in its corresponding category, the use of the cat main template is redundant.
How do I categorize categories which have a main article?
Take John Lennon and Category:John Lennon or The KLF and Category:The KLF. Should all category memberships which relate to Lennon or the KLF (but not to, for example, the state of the article) be added to Category:John Lennon/Category:The KLF and removed from the article? That would seem to follow from literal interpretation of the "no categorizing into a subcategory and category at once" rule, but it forces readers to click an extra time and hides relationships from them.
"Normal" redirects in the form #REDIRECT [[Category:Better name]] are not currently recommended in category space. Instead, use the template ((Category redirect)): a bot periodically recategorizes articles in the redirected category to the target category. Any editor can add a category redirect although, in general, established categories should not be unilaterally redirected but should be taken to Wikipedia:Categories for discussion to suggest redirecting as part of a rename / merger of the category.
Categories can be moved as of May 22, 2014. The old name will have ((Category redirect|New name)) instead of #REDIRECT [[:Category:New name]].
The category feature appeared in the MediaWiki software v1.3, which was implemented on Wikipedia in late May 2004.
Initially categories were displayed at the top right of articles, but they were soon moved to the bottom due to layout conflicts. (Not every skin has them at the bottom; e.g. Cologne Blue has them at top right.)
Category pages still show old sub-categories and articles after edits .
Work-around: You need to make a dummy edit to the category page to fix this, e.g., add a space at the end of a line. Explain this in the edit summary (e.g. "Dummy edit to refresh"), and flag the edit as minor if you have a Wikipedia user account.
Categories can be sub-categories of themselves .
When trying to categorize an article, it may be difficult to tell into which categories it should be placed. Sometimes when trying to categorize by a field of interest, one intersects with someone else's efforts from another field.
Category policies are still being refined by experimentation, discussion, and polls. Categorizations and systems are likely to be discussed and improved upon for a very long time. To be part of the discussion see Wikipedia talk:Categorization.
Topic categories are unlikely to be subcategories of list categories.
Currently the software does not allow you to look at Category:People and retrieve a list of all articles in sub-categories.
Why might a category list not be up to date?
Sometimes, pages are not placed in categories manually by Wikipedia editors, but by means of templates, which can be used to place identical information (including category membership information) on many different pages at once. When the information on such a template is edited, the pages containing that template are updated, but not necessarily updated immediately. This means that pages might not always appear in the most current categories. However, this problem usually affects project maintenance categories rather than the categories used for browsing.
Various other delays sometimes mean that lists of category members or subcategories, or the page counts given, are not completely up to date (see Phabricator tickets T18036, T132467, and T157670 for technical details). So if you are editing Wikipedia and find that your page hasn't yet shown up in a category or been removed from an old category, don't panic! The problem may resolve itself within minutes, but sometimes it may take longer, in some cases days, even months. (It may help if you make a null edit to the page.)
A couple of tools help maintain and analyze categories:
CatCycle[dead link] traces cycles in category structure or finds the relationship between two categories.
PetScan is a powerful querying tool that, among other tasks, can scan categories, selecting pages on many categories.