Template:Em/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>RussBot
m Robot: change redirected category Typing aid templates to Typing-aid templates
meta>Dodoïste
→‎Usage: clearer good and bad examples
Line 15: Line 15:


This template puts intentional and explicit <code><nowiki><em>...</em></nowiki></code> (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 <code><nowiki><em>...</em></nowiki></code> (emphasis) markup around the text provided as the first parameter. It is safest to always use the {{para|1}} syntax.
=== Good example ===
This template is made to [[emphasis|emphasize]] keywords. Example:
*"An emphasis signify a context difference only {{em|while}} the text is being read." This example should use <code><nowiki>{{em|while}}</nowiki></code>.
=== When this template should not be used ===
But careful, {{t|Em}} is strictly for emphasis. It should not be used for layout, typography conventions, books and such. In these different cases, italics <code><nowiki>''...''</nowiki></code> or <code><nowiki><i>...</i></nowiki></code> should be used instead:
*"''The New York Times'' is an American daily newspaper." This example should use <code><nowiki>''The New York Times''</nowiki></code>.
=== Purpose ===


The purpose of this template is to make it faster and easier to apply HTML "emphasis" style to text, and more importantly to completely prevent bad-behaving bots from replacing intentionally and semantically meaningful <code>&lt;em&gt;</code> (which is usually rendered visually in an italic 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 italicization (as used for book titles, etc.) in either <code>&lt;i&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).
The purpose of this template is to make it faster and easier to apply HTML "emphasis" style to text, and more importantly to completely prevent bad-behaving bots from replacing intentionally and semantically meaningful <code>&lt;em&gt;</code> (which is usually rendered visually in an italic 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 italicization (as used for book titles, etc.) in either <code>&lt;i&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).

Revision as of 17:46, 1 October 2010

Usage

Template:Tlnull

or

Template:Tlnull

These both render as:

text to be emphasized

This template puts intentional and explicit <em>...</em> (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 keywords. Example:

  • "An emphasis signify a context difference only while the text is being read." This example should use {{em|while}}.

When this template should not be used

But careful, {{Em}} is strictly for emphasis. It should not be used for layout, typography conventions, books and such. In these different cases, italics ''...'' or <i>...</i> should be used instead:

  • "The New York Times is an American daily newspaper." This example should use ''The New York Times''.

Purpose

The purpose of this template is to make it faster and easier to apply HTML "emphasis" style to text, and more importantly to completely prevent bad-behaving bots from replacing intentionally and semantically meaningful <em> (which is usually rendered visually in an italic 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 italicization (as used for book titles, etc.) in either <i> 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

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