Template:Left/doc: Difference between revisions

Corrections.
(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>
3,860

edits