Template:Center/HTML4/doc

From MozillaWiki
< Template:Center‎ | HTML4
Revision as of 10:16, 25 January 2015 by Lakrits (talk | contribs) (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>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Edit-copy green.svg
This is a documentation subpage for Template:Center/HTML4.
It contains usage information, categories and other content that is not part of the original template page.

Usage

{{center}} 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 {{[[Template:|]]}} instead of this one.

Parameters

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

Syntax

The template's syntax is

  • {{center|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|1}}

Examples

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

See also

General alignment
Specific alignment
  • {{[[Template:|]]}}: uses the CSS styling attribute style="…" for alignment (HTML5 compliant).
  • {{left}}
  • {{right}}