Template:Center/doc: Difference between revisions

Updated /doc.
(Updated /doc.)
Line 2: Line 2:
__NOTOC__
__NOTOC__
==Usage==
==Usage==
{{tl|center}} encloses the input text or element code in <div>-tags and center-aligns the output block.
{{tl|center}} encloses the input text or element code in {{tag|div|o}} tags and center-aligns the output block.
 
;<big>Note</big>
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:center}}, to center-align the output. If you need to use HTML4, use the template {{tl||center/HTML4}}.


==Parameters==
==Parameters==
Line 16: Line 19:
The text (or other element) you wish to center-align. The parameter is unnamed, so no parameter name needs to be specified.  
The text (or other element) you wish to center-align. The parameter is unnamed, so no parameter name needs to be specified.  


;Usage
;<big>Usage</big>
* {{tlc|center|'''custom text/element'''}}
* {{tlc|center|<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/HTML4}}: uses the HTML4 attribute {{samp|align{{=}}"…"}} (deprecated in HTML5).
* {{tl|left}}
* {{tl|left}}
* {{tl|right}}
* {{tl|right}}
Line 40: Line 43:
<includeonly>
<includeonly>
<!-- Add categories below -->
<!-- Add categories below -->
[[Category:Text formatting templates|Center, alignment]]
[[Category:Text formatting templates|center alignment]]
</includeonly>
</includeonly>
3,860

edits