Help:Category

From Wikipedia, the free encyclopedia

For guidelines on the use of categories in Wikipedia, see Wikipedia:Categorization. For a basic readers' guide see Help:Categories. For quick answers, see the readers' FAQ or the editors' FAQ on categories.

This information page describes the editing community's consensus on some aspect or aspects of Wikipedia's norms and practices. It is not one of Wikipedia's policies or guidelines. Shortcut:

Wikipedia data structure

Namespaces

Subject namespaces Talk namespaces
0 (Main/Article) Talk 1
2 User User talk 3
4 Wikipedia Wikipedia talk 5
6 File File talk 7
8 MediaWiki MediaWiki talk 9
10 Template Template talk 11
12 Help Help talk 13
14 Category Category talk 15
100 Portal Portal talk 101
108 Book Book talk 109
118 Draft Draft talk 119
446 Education Program Education Program talk 447
710 TimedText TimedText talk 711
828 Module Module talk 829
2300 Gadget Gadget talk 2301
2302 Gadget definition Gadget definition talk 2303

Virtual namespaces

-1 Special
-2 Media

Categories are intended to group together pages on similar subjects. They are implemented by a MediaWiki feature that adds any page with a text like [[Category:XYZ]] in its wikimarkup to the automated listing that is the category with name XYZ. Categories help readers to find, and navigate around, a subject area, to see pages sorted by title, and to thus find article relationships.

Categories are normally found at the bottom of an article page. Clicking a category name brings up a category page listing the articles (or other pages) that have been added to that particular category. There may also be a section listing the subcategories of that category. The subcategorization feature makes it possible to organize categories into tree-like structures to aid navigation.

The term category does refer to both the title of a category page—the category pagename—and the category itself. Keeping this in mind while reading about categorization, plus learning a category page layout is a worthwhile investment in research techniques. (See also the search box parameter "incategory".) The layout of a category page is mostly text, but see about displaying category trees below.

 

Contents

  [hide

 

Summary

The MediaWiki software maintains tables of categories, to which any editable page can be added. To add a page to a category, include "[[Category:Category name]]" or "[[Category:Category name|Sortkey]]" in that page's wikimarkup. The categories to which a page belongs appear in a box at the bottom of the page.

A category is usually associated with a category page in the "Category:" namespace.[1] A category page contains text that can be edited, like any other page, but when the page is displayed, the last part of what is displayed is an automatically generated list of all pages in that category, in the form of links. Other category pages which appear in this list are treated separately, as subcategories.

Putting pages in categories

A page belongs to a category if the page's wikimarkup contains a declaration for that category. A category declaration takes the form [[Category:Category name]]or [[Category:Category name|Sortkey]]. The declaration must be processed, i.e. it will not work if it appears between <nowiki>...</nowiki> or <includeonly>...</includeonly> tags, or in a comment. The declaration may however come from a transcluded page; see Categories and templates below.

A category name can be any string that would be a legitimate page title. It cannot begin with a lower-case letter. If the category name given in a category declaration begins with a lower-case letter, then it is interpreted as if it were capitalized.

In Wikipedia, it is customary to place category declarations at the end of the wikimarkup, but before any stub templates (which themselves transclude categories) and interlanguage links.

When a page has been added to one or more categories, a categories box appears at the bottom of the page (or possibly elsewhere, if a non-default skin is being used). This box contains a list of the categories the page belongs to, in the order in which the category declarations appear in the processed wikimarkup. The category names are linked to the corresponding category pages. They appear as redlinks if the corresponding category page does not exist. If a user has enabled the HotCat gadget, the categories box will also provide links to quickly add, remove, or modify category declarations on the page, without having to edit the whole page.

Hidden categories are not displayed, except as described below under Hiding categories.