Template:Center/HTML4

From MozillaWiki
Jump to: navigation, search
{{{1}}}
Documentation icon Template documentation[view] [edit] [history] [purge]

Usage

{{center/HTML4}} encloses the input text or element code in <div> tags and center-aligns the output block.

Note

This template complies with HTML4 standards. In HTML5, the attribute used by this template, align, is deprecated. If you want to use HTML5, use the template {{center}} instead of this one.

Parameters

There is only 1 parameter, which is unnamed and required.

Syntax

The template's syntax is

  • {{center/HTML4|custom text/element}}

Required parameters

1

Custom text/element

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

Usage
  • {{center/HTML4|1}}

Examples

Case What you type What you see
Text This text is center-aligned}}
This text is center-aligned
Image [[File:Idea.png|20px|link=]]}}
Idea.png

See also

General alignment
Specific alignment
  • {{center}}: uses the CSS styling attribute style="…" for alignment (HTML5 compliant).
  • {{left}}: uses the CSS styling attribute style="…" for alignment (HTML5 compliant).
  • {{left/HTML4}}: uses the HTML4 attribute align="…" (deprecated in HTML5).
  • {{right}}: uses the CSS styling attribute style="…" for alignment (HTML5 compliant).
  • {{right/HTML4}}: uses the HTML4 attribute align="…" (deprecated in HTML5).