From Wikipedia, the free encyclopedia
Jump to: navigation, search


Documentation icon Template documentation[view] [edit] [history] [purge]

This meta-template formats text into the standard style for an inline (not block-level) Wikipedia:Hatnote variant. The two most common uses for this are for inline "(See also ...)" inline Wikipedia cross-references, provided by the {{crossref}} template, and hatnotes (also generally cross-references) inside definitions in template-formatted glossaries, provided by the {{ghat}} template.

{{Hatnote-inline}} produces a short note placed at the point of insertion, to link to more information or otherwise cross-reference another Wikipedia page.

Inline cross-references look like this: Example inline hatnote text.


This template is primarily used to add a correctly formatted inline cross-references to a page. Often, but not always, this is a see other page link in a parenthetical. It places an HTML <span>...</span> container around the text entered as its first, required parameter, upon which it provides standardized formatting (italicized in most displays); it also uses CSS classes to isolate the contained code to make sure that it is interpreted correctly and can be acted upon independently of true article content.

The template does not automatically create links of any kind. Links and other desired formatting must be explicitly added, using normal Wikipedia markup.


Basic usage
All parameters
{{hatnote-inline|text|extraclasses=class1 class2|selfref=yes|category=no}}


This template accepts the following parameters:

  • 1 – the cross-reference text. (required)
  • extraclasses – any extra CSS classes to be added. For example, the {{see also}} template adds the classes |extraclasses=boilerplate seealso.
  • selfref – if set to "yes", "y", "true" or "1", adds the CSS class "selfref". This is used to denote self-references to Wikipedia. See Template:Selfref for more information.
  • category – if set to "no", "n", "false", or "0", suppresses the error tracking category (Category:Hatnote templates with errors). This only has an effect if the first positional parameter (the hatnote text) is omitted.


  • {{hatnote-inline|See [[Taxonomic nomenclature]] for more detail.}}See Taxonomic nomenclature for more detail.

Technical details[edit]

The HTML code produced by this template looks like this:

  • <span class="hatnote">hatnote text</span>

This is the same class used by the <div>-based {{hatnote}} template, the block display of which is controlled by a separate div.hatnote directive in Mediawiki:Common.css.

The code is produced by Module:Hatnote/sandbox-inline.


See also[edit]

Templates based on this meta-template[edit]