Difference between revisions of "Template:Strong/doc"

From Summertime Saga Wiki
Jump to: navigation, search
(Created page with "== Purpose == This template makes it faster and easier to apply the {{tag|strong}} {{strong|importance, seriousness, or urgency}} HTML element to t...")
 
m
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Purpose ==
+
The template {{tlg|strong}} makes it faster and easier to apply the {{tag|strong}} {{strong|importance, seriousness, or urgency}} 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}}.
  
This template makes it faster and easier to apply the {{tag|strong}} {{strong|importance, seriousness, or urgency}} [[wikipedia:HTML element|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}}. The {{tag|strong}} element is usually rendered visually in a bold 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 [[wikipedia:semantic markup|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.
+
The {{tag|strong}} element is usually rendered visually in a bold 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.
  
 
== Usage ==
 
== Usage ==
  
: {{tnull|strong|<var>important text</var>}}
+
: {{tlg|code=yes|nolink=yes|strong|{{var|important text}}}}
  
 
or, if the important text contains an equals sign:
 
or, if the important text contains an equals sign:
: {{tnull|strong|'''1{{=}}'''<var>important text</var>}}
+
: {{tlg|code=yes|nolink=yes|strong|1{{=}}{{var|important text}}}}
  
 
These both render as:
 
These both render as:
Line 17: Line 17:
 
=== Optional parameters ===
 
=== Optional parameters ===
  
Advanced HTML values can be passed through the template to the HTML code:
+
; {{para|role}} : Takes a WAI-ARIA role; adds {{para|role|"{{var|rolename}}"}} to the HTML code.
* {{para|role}} takes a WAI-ARIA role; adds <code>role="<var>rolename</var>"</code> to the HTML code
+
; {{para|class}} : Takes a class name (or multiple class names, separated by spaces); adds {{para|class|"{{var|classname[s]}}"}} to the HTML code.
* {{para|class}} takes a class name (or multiple class names, separated by spaces); adds <code>class="<var>classname[s]</var>"</code> to the HTML code
+
; {{para|style}} : Takes inline CSS input; adds {{para|style|"{{var|CSS directive[s]}}"}} to the HTML code.
* {{para|style}} takes inline CSS input; adds <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 {{para|id|"{{var|name}}"}} 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 {{tlg|code=yes|nolink=yes|strong}} span.
* {{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
 
  
=== Use cases ===
+
== Use cases ==
  
This template is made to mark important words or phrases in a text, in a way that is [[wikipedia:Semantic markup|semantically meaningful markup]]. With this technique, the important 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 importance, 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.
+
This template is made to mark important words or phrases in a text, in a way that is semantically meaningful markup. With this technique, the important 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 importance, 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.
  
 
Typical uses on the wiki:
 
Typical uses on the wiki:
* In the lead section of an article, the article's title and its synonyms {{em|should}} be marked with {{tnull|strong}}.
+
* In the lead section of an article, the article’s title and its synonyms {{em|should}} be marked with {{tlg|code=yes|nolink=yes|strong}}.
 
* 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.
 
* 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.
  
 
== When this template should not be used? ==
 
== When this template should not be used? ==
  
Because {{tnull|strong}} is strictly for semantic importance, 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 to indicate importance itself.
+
Because {{tlg|code=yes|nolink=yes|strong}} is strictly for semantic importance, 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 {{tlg|code=yes|em}} instead. Avoid using {{tlg|code=yes|nolink=yes|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 to indicate importance itself.
  
 
== See also ==
 
== See also ==
  
* {{tlx|em}} – for italic rather than bold semantic emphasis
+
* {{tlg|em}} – for italic rather than bold semantic emphasis
  
[[Category:Documentation subpages‏‎]]
+
[[Category:Templates]][[Category:Semantic markup templates]][[Category:Templates documentation‏‎]]

Latest revision as of 16:18, 21 July 2020

The template {{strong}} makes it faster and easier to apply the <strong>…</strong> importance, seriousness, or urgency 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>.

The <strong>…</strong> element is usually rendered visually in a bold 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.

Usage

{{strong|important text}}

or, if the important text contains an equals sign:

{{strong|1=important text}}

These both render as:

important text

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

Optional parameters

|role= 
Takes a WAI-ARIA role; adds |role="rolename" to the HTML code.
|class= 
Takes a class name (or multiple class names, separated by spaces); adds |class="classname[s]" to the HTML code.
|style= 
Takes inline CSS input; adds |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

This template is made to mark important words or phrases in a text, in a way that is semantically meaningful markup. With this technique, the important 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 importance, 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.

Typical uses on the wiki:

  • In the lead section of an article, the article’s title and its synonyms should be marked with {{strong}}.
  • 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.

When this template should not be used?

Because {{strong}} is strictly for semantic importance, 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 to indicate importance itself.

See also

  • {{em}} – for italic rather than bold semantic emphasis