Template:Strong/doc

From Ava Zinn Wiki
< Template:Strong
Revision as of 15:12, 1 October 2010 by Dodoïste (talk) (Usage: further explanations of good and bad usages)
Jump to: navigation, search

Usage

{{strong|text to be emphasized}}

or

{{strong|1=text to be emphasized if it contains an equals sign}}

These both render as:

text to be emphasized

This template puts intentional and explicit <strong>...</strong> (strong emphasis) markup around the text provided as the first parameter. It is safest to always use the |1= syntax.

Good example

This template is made to emphasize important keywords in a text. With this technique, the emphasized text strongly stands out from the rest; it should therefore be used to highlight certain keywords that are important to the subject of the text, for easy visual scanning of text. See also WikiProject Usability/Scannability.

Examples:

  • "By contrast, a single word in boldface attracts the human eyeball and is therefore recommended for keywords the reader might be looking for." This example should use {{strong|boldface}} as it is the most important keyword in the sentence.
  • In the lead section of the article, the article's title and its synonyms should be emphasized with Template:T. Example: "The soma, or perikaryon, or cyton, is the bulbous end of a neuron."

When this template should not be used

But careful, Template:T is strictly for emphasis. It should not be used for layout, typography conventions and such. In these different cases, bold '''...''' or <b>...</b> should be used instead.

Purpose

The purpose of this template is to make it faster and easier to apply HTML "strong emphasis" style to text, and more importantly to completely prevent bad-behaving bots from replacing intentionally and semantically meaningful <strong> (which is usually rendered visually in a bold (heavy) typeface by default on graphical browsers, but can be parsed and acted upon in customizable ways with style sheets, apps and text-to-speech screen readers) with purely typographic and semantically meaningless simple boldfacing (as used for book titles, etc., when they appear in an already-italicized passage) in either <b> or ''' format. The average user, and average editor, do not and need not care about this distinction most of the time, but the distinction can be important and editors who understand it can use this template as a baseline insurance against accidental or careless replacement by bots (or humans for that matter).

Optional parameters

Advanced HTML values can be passed through the template to the HTML code:

  • |class= takes a class name (or multiple class names, separated by commas); adds class="classname[s]" to the HTML code
  • |style= takes inline CSS input; addes style="CSS directive[s]" to the HTML code
  • |lang= takes ISO language codes in one or two part form (e.g. fr or fr-CA); adds lang="language-code" xml:lang="language-code" to the HTML code. Generally only used for foreign language material (e.g. in a quotation). Do not use for English unless the material enclosed in this markup is extremely dialectal, and the dialect has an ISO code (do not try to make up codes).
  • |id= takes a valid, unique HTML id (must begin with an alphabetic letter); adds id="name" to the HTML code

See also

  • {{em}} - same thing but for preventing <em> markup being changed into <i> or ''