Jump to content

Template:Center/doc: Difference between revisions

From the Vrienden Universe, a fictional wiki
Remove unused Wikipedia category assignments
Remove unsupported imported template links from documentation
 
Line 44: Line 44:


== See also ==
== See also ==
* {{tl|Center block}}
* <code>Template:Center block</code>
* {{tl|align}}
* {{tl|align}}
* {{tl|right}}, {{tl|left}} and {{tl|justify}}
* {{tl|right}}, {{tl|left}} and <code>Template:Justify</code>
* {{tl|Image frame}}
* <code>Template:Image frame</code>
* {{tl|Table alignment}} - to align whole columns in tables.
* <code>Template:Table alignment</code> - to align whole columns in tables.


<includeonly>{{sandbox other||
<includeonly>{{sandbox other||

Latest revision as of 23:36, 26 September 2026

Description

[edit source]

It is to center elements on a page. See also Template:Align for more options and flexibility.

Markup Renders as
{{Center|Hello world!}}
Hello world!

To do this without a template, simply use the following code: <syntaxhighlight lang="HTML">

...

</syntaxhighlight> To center a table, see Help:TABLECENTER.

Notes:

  • If the markup to be centered includes an equals sign, the markup must be preceded by 1=. Example: {{Center|1=the <span style="color:red">red</span> one}}.
  • If the markup to be centered includes a displaying pipe, the pipe must be escaped as {{!}} or &#124;.

Tables

[edit source]

Using {{left}} / {{center}} / {{right}}

Header text
Left
Center
Right

Using {{align|left}} / {{align|center}} / {{align|right}}

Header text
Left
Center
Right

Tracking categories

[edit source]


See also

[edit source]
  • Template:Center block
  • {{align}}
  • {{right}}, {{left}} and Template:Justify
  • Template:Image frame
  • Template:Table alignment - to align whole columns in tables.