Template:Left/doc: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Corrections.)
 
Line 2: Line 2:
__NOTOC__
__NOTOC__
==Usage==
==Usage==
{{tl|left}} encloses the input text or element code in <div>-tags and aligns the output block to the left.
{{tlf|'''left'''}} encloses the input text or element code in {{tag|div|o}} tags and left-aligns the output block.
 
;<big>Note</big>
{{mark|This template complies with '''HTML5 standards'''}}. In HTML5, the attribute {{samp|align}} is deprecated. Instead, the template uses the CSS styling attribute {{samp|style}} and the property:value pair {{samp|text-align:left}}, to left-align the output. If you need to use HTML4, use the template {{tl|left/HTML4}}.


==Parameters==
==Parameters==
Line 14: Line 17:
====1====
====1====
;<big>Custom text/element</big>
;<big>Custom text/element</big>
The text (or other element) you wish to left-align. The parameter is unnamed, so no parameter name needs to be specified.  
The text (or other element) you wish to left-align. The parameter is unnamed, so no parameter name needs to be specified.


;Usage
;<big>Usage</big>
* {{tlc|left|'''custom text/element'''}}
* {{tlc|left|<big>'''1'''</big>}}


==Examples==
==Examples==
===Correct use===
{| class="wikitable" style="background-color: white;"
{| class="wikitable" style="background-color: white;"
|-
|-
Line 35: Line 37:


;<big>Specific alignment</big>
;<big>Specific alignment</big>
* {{tl|center}}
* {{tl|center}}: uses the CSS styling attribute {{samp|style{{=}}"…"}} for alignment (HTML5 compliant).
* {{tl|right}}
* {{tl|center/HTML4}}: uses the HTML4 attribute {{samp|align{{=}}"…"}} (deprecated in HTML5).
* {{tl|left/HTML4}}: uses the HTML4 attribute {{samp|align{{=}}"…"}} (deprecated in HTML5).
* {{tl|right}}: uses the CSS styling attribute {{samp|style{{=}}"…"}} for alignment (HTML5 compliant).
* {{tl|right/HTML4}}: uses the HTML4 attribute {{samp|align{{=}}"…"}} (deprecated in HTML5).


<includeonly>
<includeonly>
<!-- Add categories below -->
<!-- Add categories below -->
[[Category:Text formatting templates|Left, alignment]]
[[Category:Text formatting templates|left alignment]]
</includeonly>
</includeonly>

Latest revision as of 11:05, 25 January 2015

Edit-copy green.svg
This is a documentation subpage for Template:Left.
It contains usage information, categories and other content that is not part of the original template page.

Usage

{{left}} encloses the input text or element code in <div> tags and left-aligns the output block.

Note

This template complies with HTML5 standards. In HTML5, the attribute align is deprecated. Instead, the template uses the CSS styling attribute style and the property:value pair text-align:left, to left-align the output. If you need to use HTML4, use the template {{left/HTML4}}.

Parameters

There is only 1 parameter, which is unnamed and required.

Syntax

The template's syntax is

  • {{left|custom text/element}}

Required parameters

1

Custom text/element

The text (or other element) you wish to left-align. The parameter is unnamed, so no parameter name needs to be specified.

Usage
  • {{left|1}}

Examples

Case What you type What you see
Text {{left|This text is left-aligned}}
This text is left-aligned
Image {{left|[[File:Idea.png|20px|link=]]}}
Idea.png

See also

General alignment
Specific alignment
  • {{center}}: uses the CSS styling attribute style="…" for alignment (HTML5 compliant).
  • {{center/HTML4}}: uses the HTML4 attribute align="…" (deprecated in HTML5).
  • {{left/HTML4}}: uses the HTML4 attribute align="…" (deprecated in HTML5).
  • {{right}}: uses the CSS styling attribute style="…" for alignment (HTML5 compliant).
  • {{right/HTML4}}: uses the HTML4 attribute align="…" (deprecated in HTML5).