Difference between revisions of "Template:Strong/doc"

From Ava Zinn Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Good examples: +1 example)
m (42 revisions from wikipedia:Template:Strong/doc)
 
(31 intermediate revisions by 12 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
+
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE -->
 +
 
 +
== Purpose ==
 +
 
 +
This template makes it faster and easier to apply the {{tag|strong}} {{strong|strong emphasis}} [[HTML element]] to text, and more importantly to indicate to human and bot editors they should not use <code><nowiki>'''...'''</nowiki></code> or {{tag|b}} typographic boldfacing to replace the intentional and semantically meaningful {{tag|strong|open}}.  Strong emphasis 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. It is said to be [[semantic markup]], i.e. markup that conveys meaning or context, not just visual appearance. Simple boldfacing is purely typographic and is semantically meaningless. It is most often used for headings, but has a few other uses (such as for book or film titles and the like, which are usually italicized, when they appear in an already-italicized passage).  The average reader, and average editor, do not and need not care about this distinction most of the time, but it can be important and editors who understand it can use this template as a baseline insurance against accidental or careless replacement by bots and human editors.
  
 
== Usage ==
 
== Usage ==
Line 6: Line 10:
 
:{{tlnull|strong|<var>text to be emphasized</var>}}
 
:{{tlnull|strong|<var>text to be emphasized</var>}}
  
or
+
or, if the text to be emphasized contains an equals sign:
 
+
:{{tlnull|strong|'''1{{=}}'''<var>text to be emphasized</var>}}
:{{tlnull|strong|'''1{{=}}'''<var>text to be emphasized if it contains an equals sign</var>}}
 
  
 
These both render as:
 
These both render as:
 
 
:{{strong|text to be emphasized}}
 
:{{strong|text to be emphasized}}
  
This template puts intentional and explicit <code><nowiki><strong>...</strong></nowiki></code> (strong emphasis) markup around the text provided as the first parameter. It is safest to always use the {{para|1}} syntax.
+
This template puts intentional and explicit {{tag|strong}} (strong emphasis) [X]HTML markup around the text provided as the first parameter. It is safest to always use the {{para|1}} syntax.
  
=== Good examples ===
+
===Optional parameters===
 +
Advanced HTML values can be passed through the template to the HTML code:
 +
* {{para|class}} takes a class name (or multiple class names, separated by commas); adds <code>class="<var>classname[s]</var>"</code> to the HTML code
 +
* {{para|style}} takes inline CSS input; addes <code>style="<var>CSS directive[s]</var>"</code> to the HTML code
 +
* {{para|id}} takes a valid, unique HTML id (must begin with an alphabetic letter); adds <code>id="<var>name</var>"</code> to the HTML code
 +
* {{para|title}} takes text, which cannot be marked up in any way, and displays it as a pop-up "tooltip" when the cursor hovers over the {{tnull|strong}} span
  
This template is made to [[emphasis|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 [[Wikipedia:WikiProject Usability/Scannability|WikiProject Usability/Scannability]].  
+
===Use cases===
 +
{{more|Wikipedia:WikiProject Usability/Scannability}}
 +
This template is made to [[:wikt:emphasis|strongly emphasize]] important words or phrases in a text, in a way that is (unlike simply boldfacing it) [[Semantic markup|semantically meaningful markup]]. With this technique, the emphasized text strongly stands out from the rest in most if not all visual browsers and some text-to-speech screen readers (which usually ignore purely typographic boldfacing), and can also be parsed by user agents and other software as definitively indicating emphasis, not just some typographic boldface effect for appearance's sake. It should therefore only be used very sparingly in articles to highlight the most important words or phrases in the entire article (and, rarely in encyclopedic writing, to represent strong vocal emphasis). Use of this template has a strong effect on scannability, drawing the eye from elsewhere on the page to words marked up with the template.
  
Examples:
+
Typical uses on Wikipedia:
*"By contrast, a single word in {{strong|boldface}} attracts the human eyeball and is therefore recommended for keywords the reader might be looking for." This example should use <code><nowiki>{{strong|boldface}}</nowiki></code> as it is the most important keyword in the sentence.
+
* In the [[WP:LEAD|lead section of an article]], the article's title and its synonyms {{em|should}} be emphasized with {{tnull|strong}}. Example: "The {{strong|soma}}, or {{strong|perikaryon}}, or {{strong|cyton}}, is the bulbous end of a neuron." {{As of|February 2012}}, this is not yet common, but users should not revert it (nor criticize anyone for not using it).
*In the lead section of the article, the article's title and its synonyms should be emphasized with {{t|strong}}. Example: "The {{strong|soma}}, or {{strong|perikaryon}}, or {{strong|cyton}}, is the bulbous end of a neuron."
+
* After the lead, it {{em|can}} be used to highlight crucial terms of importance only slightly secondary to that of the article title and its synonyms. For example, the article on a viral infection might use {{tnull|strong}} to highlight the names of two identified strains of the disease in a "Varieties" section, as an aid to scannability.
*In polls, and similar comments and debates where users approves or disagree with a view or proposal. Example: "{{strong|Support}}, because of this and that reasons [...]" or "{{strong|Oppose the proposal n°x}}, because of this and that reasons [...]".
+
* In unusual cases (most often direct quotations) it is used to represent text that would be strongly emphasized for contextual reasons if the passage were spoken rather than written (e.g., because it indicates shouting).
 +
* Outside articles, it {{em|should}} be used (but {{as of|February 2012|lc=y}} isn't yet common) in polls, XfD processes, RfX votes, and similar comments and debates where users indicate that they approve of or disagree with a view or proposal. Example: "{{strong|Support}}, because of this and that reasons [...]" or "{{strong|Oppose}}, because of this and that reasons [...]".
  
=== When this template should not be used ===
+
== When this template should not be used ==
  
But careful, {{t|Strong}} is strictly for emphasis. It should not be used for layout, typography conventions and such. In these different cases, bold <code><nowiki>'''...'''</nowiki></code> or <code><nowiki><b>...</b></nowiki></code> should be used instead.
+
Because {{tnull|strong}} is strictly for semantic (meaningful) emphasis, it should not be used for layout, typography conventions and such. In these different cases, bold <code><nowiki>'''...'''</nowiki></code> (which resolves to {{tag|b}} in the browser or other user agent) should be used instead. It should also not be used when the text to which it is applied is already boldfaced for some other reason (e.g., it is part of a heading); in such cases use {{tlx|em}} instead.  Avoid using {{tnull|strong}} in non-quoted sentences that end in an exclamation point. And it is usually excessive to use it on terms that are already wikilinked, since the link markup acts as a form of emphasis itself.
  
=== 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 <code>&lt;strong&gt;</code> (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 <code>&lt;b&gt;</code> or <code><nowiki>'''</nowiki></code> 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:
 
*{{para|class}} takes a class name (or multiple class names, separated by commas); adds <code>class="<var>classname[s]</var>"</code> to the HTML code
 
*{{para|style}} takes inline CSS input; addes <code>style="<var>CSS directive[s]</var>"</code> to the HTML code
 
*{{para|lang}} takes ISO language codes in one or two part form (e.g. <code>fr</code> or <code>fr-CA</code>); adds <code>lang="<var>language-code</var>" xml:lang="<var>language-code</var>"</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).
 
*{{para|id}} takes a valid, unique HTML id (must begin with an alphabetic letter); adds <code>id="<var>name</var>"</code> to the HTML code
 
  
== See also ==
+
{{Semantic markup templates}}
*{{tlx|em}} - same thing but for preventing <code>&lt;em&gt;</code> markup being changed into <code>&lt;i&gt;</code> or <code><nowiki>''</nowiki></code>
 
  
 
<includeonly>
 
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
+
<!-- CATEGORIES BELOW THIS LINE, PLEASE: -->
[[Category:Typing aid templates]]
+
[[Category:Semantic markup templates]]
 +
[[Category:Wikipedia XHTML tag-replacing templates]]
 
</includeonly>
 
</includeonly>

Latest revision as of 19:54, 6 March 2016

Purpose[edit]

This template makes it faster and easier to apply the <strong>...</strong> strong emphasis HTML element to text, and more importantly to indicate to human and bot editors they should not use '''...''' or <b>...</b> typographic boldfacing to replace the intentional and semantically meaningful <strong>. Strong emphasis 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. It is said to be semantic markup, i.e. markup that conveys meaning or context, not just visual appearance. Simple boldfacing is purely typographic and is semantically meaningless. It is most often used for headings, but has a few other uses (such as for book or film titles and the like, which are usually italicized, when they appear in an already-italicized passage). The average reader, and average editor, do not and need not care about this distinction most of the time, but it can be important and editors who understand it can use this template as a baseline insurance against accidental or careless replacement by bots and human editors.

Usage[edit]

{{strong|text to be emphasized}}

or, if the text to be emphasized contains an equals sign:

{{strong|1=text to be emphasized}}

These both render as:

text to be emphasized

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

Optional parameters[edit]

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
  • |id= takes a valid, unique HTML id (must begin with an alphabetic letter); adds id="name" to the HTML code
  • |title= takes text, which cannot be marked up in any way, and displays it as a pop-up "tooltip" when the cursor hovers over the {{strong}} span

Use cases[edit]

This template is made to strongly emphasize important words or phrases in a text, in a way that is (unlike simply boldfacing it) semantically meaningful markup. With this technique, the emphasized text strongly stands out from the rest in most if not all visual browsers and some text-to-speech screen readers (which usually ignore purely typographic boldfacing), and can also be parsed by user agents and other software as definitively indicating emphasis, not just some typographic boldface effect for appearance's sake. It should therefore only be used very sparingly in articles to highlight the most important words or phrases in the entire article (and, rarely in encyclopedic writing, to represent strong vocal emphasis). Use of this template has a strong effect on scannability, drawing the eye from elsewhere on the page to words marked up with the template.

Typical uses on Wikipedia:

  • In the lead section of an article, the article's title and its synonyms should be emphasized with {{strong}}. Example: "The soma, or perikaryon, or cyton, is the bulbous end of a neuron." As of February 2012, this is not yet common, but users should not revert it (nor criticize anyone for not using it).
  • After the lead, it can be used to highlight crucial terms of importance only slightly secondary to that of the article title and its synonyms. For example, the article on a viral infection might use {{strong}} to highlight the names of two identified strains of the disease in a "Varieties" section, as an aid to scannability.
  • In unusual cases (most often direct quotations) it is used to represent text that would be strongly emphasized for contextual reasons if the passage were spoken rather than written (e.g., because it indicates shouting).
  • Outside articles, it should be used (but as of February 2012 isn't yet common) in polls, XfD processes, RfX votes, and similar comments and debates where users indicate that they approve of or disagree with a view or proposal. Example: "Support, because of this and that reasons [...]" or "Oppose, because of this and that reasons [...]".

When this template should not be used[edit]

Because {{strong}} is strictly for semantic (meaningful) emphasis, it should not be used for layout, typography conventions and such. In these different cases, bold '''...''' (which resolves to <b>...</b> in the browser or other user agent) should be used instead. It should also not be used when the text to which it is applied is already boldfaced for some other reason (e.g., it is part of a heading); in such cases use {{em}} instead. Avoid using {{strong}} in non-quoted sentences that end in an exclamation point. And it is usually excessive to use it on terms that are already wikilinked, since the link markup acts as a form of emphasis itself.


Template:Semantic markup templates