A screencast showing how to categorise pages and explaining the usage of
HotCatEvery Wikipedia page should belong to at least one category, except for
talk pages,
redirects, and
user pages, which may optionally be placed in categories where appropriate. Each categorized page should be placed in all of the
most specific categories to which it logically belongs. This means that if a page belongs to a
subcategory of C (or a subcategory of a subcategory of C, and so on) then it is
not normally placed directly into C. For exceptions to this rule, see
§ Eponymous categories and
§ Non-diffusing subcategories below.
While it should typically be clear from the name of an existing category which pages it should contain, the text of the category page may sometimes provide additional information on potential category contents. One way to determine if suitable categories already exist for a particular page is to check the categories of pages concerning similar or related topics. Another way is to search existing category names as described
here (top of page). Since all categories form part of a hierarchy, do not add categories to pages as if they are
tags.
Apart from certain exceptions (i.e.
eponymous categories and
non-diffusing subcategories – see below), an article should be categorised under the
most specific branch in the category tree possible, without duplication in parent categories above it. In other words, articles should rarely be placed in both a given category and any of its sub- or parent (super-) categories. For example, the article "Paris" need only be placed in "Category:Cities in France",
not in both "
Category:Cities in France" and "
Category:Populated places in France". Because the first category (cities) is in the second category (populated places), readers are already given the information that Paris is a populated place in France by it being a city in France.
Categorization of articles must be
verifiable. It should be clear from verifiable information in the article why it was placed in each of its categories. Use the {{
Uncited category}} template if you find an article in a category that is not shown by sources to be appropriate or if the article gives no clear indication for inclusion in a category.
Categorization must also maintain a
neutral point of view. Categorizations appear on article pages without annotations or referencing to justify or explain their addition; editors should be conscious of the need to maintain a neutral point of view when creating categories or adding them to articles. Categorizations should generally be uncontroversial; if the category's topic is likely to spark controversy, then a list article (which can be annotated and referenced) is probably more appropriate. For example, a politician (not convicted of any crime) should not be added to a category of notable criminals.
A central concept used in categorizing articles is that of the
defining characteristics of a subject of the article. A defining characteristic is one that
reliable sources commonly and
consistently define
[1] the subject as having—such as nationality or notable profession (in the case of people), type of location or region (in the case of places), etc. For example, in
Caravaggio, an Italian artist of the Baroque movement,
Italian,
artist, and
Baroque may all be considered to be defining characteristics of the subject
Caravaggio.
Particular considerations for categorizing articles:
- By convention, category declarations are placed at the end of the wikitext, but before any stub templates, which transclude their own categories.
- Eponymous categories should appear first. Beyond that, the order in which categories are placed on a page is not governed by any single rule (for example, it does not need to be alphabetical, although partially alphabetical ordering can sometimes be helpful). Normally the most essential, significant categories appear first.
- An article should never be left with a non-existent (redlinked) category on it. Either the category should be created, or else the link should be removed or changed to a category that does exist.
- Categorization should not be made by the type of an article. A biographical article about a specific person, for example, does not belong in Category:Biography (genre).
- Articles on fictional subjects should not be categorized in a manner that confuses them with real subjects. {{Category see also}} is useful for interlinking examples of real-world and fictional phenomena.
For the overuse of the word "eponymous" on Wikipedia, see
WP:TITULAR.
An eponymous category should have only the categories of its article that are relevant to the category's content. For example:
Guidelines for articles with eponymous categories - The article itself should be a member of the eponymous category and should be sorted with a space to appear at the start of the listing (see § Sort keys below).
- The article should be listed as the main article of the category using the {{cat main}} template.
- Articles with an eponymous category may be categorized in the broader categories that would be present if there were no eponymous category (e.g. the article France appears in both Category:France and Category:Western Europe, even though the latter category is the parent of the former category). Editors should decide by consensus which solution makes most sense for a category tree. There are three options:
- Keep both the eponymous category and the main article in the parent category. This is used in Category:Western Europe to allow that region's country articles to be navigated together.
- Keep just the child article. This is used in Category:British Islands, to prevent a loop.
- Keep just the eponymous category. This is used for Category:Farmworkers in Category:People by occupation. Such "X by Y" categories sometimes cover a limited navigational set, not a topic (see § Category tree organization below), thus there is no logical article content.
Category tags can be added to
file/image pages of files that have been uploaded to Wikipedia. When categorized, files are not included in the count of articles in the category, but are displayed in a separate section with a thumbnail and the name for each. A category can mix articles and images, or a separate file/image category can be created. A file category is typically a subcategory of the general category about the same subject, and a subcategory of the wider category for files,
Category:Wikipedia files. To categorize a new file when uploading, simply add the category tag to the
upload summary.
Freely licensed files may also be uploaded to, and categorized on,
Wikimedia Commons. This can be done instead of, or in addition to, uploading and categorizing on Wikipedia. Most freely licensed files will eventually be copied or moved from Wikipedia to Commons, with a mirror page remaining on Wikipedia. (For an example of one such mirror page, see
here.) Categories should not be added to these Wikipedia mirror pages, because doing so creates a new Wikipedia page that is subject to
speedy deletion. Exceptions to this principle are made for mirror pages of images that are nominated as
featured pictures and for those that appear on the Wikipedia
Main Page in the
Did You Know? column.
Images that are used in Wikipedia that are
non-free or fair use should not appear as thumbnail images in categories. To prevent the thumbnail preview of images from appearing in a category, __NOGALLERY__ should be added to the text of the category. In such cases, the file will still appear in the category, but the actual image preview will not.
Wikipedia administrative categories A distinction is made between two types of categories:
- Administrative categories, intended for use by editors or by automated tools, based on features of the current state of articles, or used to categorize non-article pages.
- Content categories, intended as part of the encyclopedia, to help readers find articles, based on features of the subjects of those articles.
Article pages should be kept out of administrative categories if possible. For example, the templates that generate WikiProject and assessment categories should be placed on talk pages, not on the articles themselves. If it is unavoidable that an administration category appears on article pages (usually because it is generated by a maintenance tag that is placed on articles), then in most cases it should be made a
hidden category, as described in
§ Hiding categories below.
In
maintenance categories and other
administrative categories, pages may be included regardless of type. For example, in an error tracking category it makes sense to group templates separately, because addressing the errors there may require different skills compared to fixing an ordinary article. For sorting each namespace separately, see
§ Sort keys below.
Drafts, no matter whether in the
draft namespace or
your userspace, are not articles, and thus do not belong in content categories such as
Living people or
Biologists. If you copy an article from mainspace to draftspace or your userspace and it already contains categories, then disable them. This can be done either by inserting a colon character to
link to each category (e.g. change
[[Category:Biologists]] to
[[:Category:Biologists]]), or by wrapping them in {{
Draft categories}} (e.g.
{{draft categories|1=[[Category:Living people]] [[Category:Biologists]] etc.}}). After you move the draft into article space, remove the leading colons to re-enable the categories. If using the draft categories template, the categories will automatically work as normal in mainspace, but the template should be removed. The same system may be used in a new draft to list the categories it may have when moved to mainspace.
It is usually desirable that pages using a template are not placed in the same categories as the template itself. To avoid this, the category for the template should be placed on the template's documentation page, normally within a
block; if there is no documentation page, the category for the template may be placed on the template itself, within a
<noinclude>...</noinclude> block. Where a
<noinclude>...</noinclude> block is the last item in the template code, there should be no spaces or newlines between the last part of the template proper and the opening
<noinclude> tag.
Categorization using templates However, it is recommended that articles not be placed in ordinary
content categories using templates in this way. There are many reasons for this: editors cannot see the category in the wikitext; removing or restructuring the category is made more difficult (partly because automated processes will not work); inappropriate articles and non-article pages may get added to the category;
sort keys may be unavailable to be customised per category; and ordering of categories on the page is less controllable.
When templates are used to populate administration categories, ensure that the code cannot generate nonsensical or non-existent categories, particularly when the category name depends on a parameter. Also, see
Category suppression for ways of keeping inappropriate pages out of template-generated categories.
Category declarations in templates often use {{PAGENAME}} as the sort key, because this overrides any DEFAULTSORT defined on the page.
In cases where, for technical reasons, administration categories appear directly on articles rather than talk pages, they should be made into
hidden categories, so that they are not displayed to readers. This rule does not apply to
stub categories or "uncategorized article" categories – these types are
not hidden.
To hide a category, add the template
to the category page (the template uses the
magic word __HIDDENCAT__). This also places the page in
Category:Hidden categories.
A logged-in user may elect to view all hidden categories, by checking "Show hidden categories" on the "Appearance" tab of
Preferences. Notice that "hidden" parent categories are never in fact hidden on category pages (although they are listed separately).
Hidden categories are listed at the bottom when previewing. All users of the desktop version can see hidden categories for a page by clicking "Page information" under "Tools" in the left pane, or by editing the whole page with the source editor.