Template:Center/HTML4/doc: Difference between revisions

Corrections.
(Created page with "{{Documentation subpage}} __NOTOC__ ==Usage== {{tl|center}} encloses the input text or element code in {{tag|div|o}} tags and center-aligns the output block. ;<big>Note</big>...")
 
(Corrections.)
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
__NOTOC__
__NOTOC__
==Usage==
==Usage==
{{tl|center}} encloses the input text or element code in {{tag|div|o}} tags and center-aligns the output block.
{{tlf|'''center/HTML4'''}} encloses the input text or element code in {{tag|div|o}} tags and center-aligns the output block.


;<big>Note</big>
;<big>Note</big>
This template complies with HTML4 standards. In HTML5, the attribute used by this template, {{samp|align{{=}}"…"}}, is deprecated. If you want to use HTML5, use the template {{tl||center}} instead of this one.
{{mark|This template complies with '''HTML4 standards'''}}. In HTML5, the attribute used by this template, {{samp|align}}, is deprecated. If you want to use HTML5, use the template {{tl|center}} instead of this one.


==Parameters==
==Parameters==
Line 12: Line 12:
===Syntax===
===Syntax===
The template's syntax is
The template's syntax is
* {{tlc|center|''custom text/element''}}
* {{tlc|center/HTML4|''custom text/element''}}


===Required parameters===
===Required parameters===
====1====
====1====
;<big>Custom text/element</big>
;<big>Custom text/element</big>
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.


;<big>Usage</big>
;<big>Usage</big>
* {{tlc|center|<big>'''1'''</big>}}
* {{tlc|center/HTML4|<big>'''1'''</big>}}


==Examples==
==Examples==
Line 27: Line 27:
! Case !! What you type !! style="width: 400px" | What you see
! Case !! What you type !! style="width: 400px" | What you see
|-
|-
| Text || {{tlc|center|This text is center-aligned}} || {{center|This text is center-aligned}}
| Text || {{tlc|center/HTML4|This text is center-aligned}} || {{center/HTML4|This text is center-aligned}}
|-
|-
| Image || {{tlc|center|<nowiki>[[File:Idea.png|20px|link=]]</nowiki>}} || {{center|[[File:Idea.png|20px|link=]]}}
| Image || {{tlc|center/HTML4|<nowiki>[[File:Idea.png|20px|link=]]</nowiki>}} || {{center/HTML4|[[File:Idea.png|20px|link=]]}}
|}
|}


Line 37: Line 37:


;<big>Specific alignment</big>
;<big>Specific alignment</big>
* {{tl||center}}: uses the CSS styling attribute {{samp|style{{=}}"…"}} for alignment (HTML5 compliant).
* {{tl|center}}: uses the CSS styling attribute {{samp|style{{=}}"…"}} for alignment (HTML5 compliant).
* {{tl|left}}
* {{tl|left}}: uses the CSS styling attribute {{samp|style{{=}}"…"}} for alignment (HTML5 compliant).
* {{tl|right}}
* {{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>
3,860

edits