Jump to content

Template:Center/doc: Difference between revisions

From the Vrienden Universe, a fictional wiki
Remove imported Wikipedia TemplateData metadata
Replace imported Wikipedia references with Vrienden Universe wording
Line 54: Line 54:
[[Category:Positioning templates]]
[[Category:Positioning templates]]
[[Category:Typing-aid templates]]
[[Category:Typing-aid templates]]
[[Category:Wikipedia HTML tag-replacing templates]]
[[Category:HTML tag-replacing templates]]
}}</includeonly>
}}</includeonly>

Revision as of 15:38, 13 September 2026

Description

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

Usage

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

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

Header text
Left
Center
Right

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

Header text
Left
Center
Right

Tracking categories


See also