Template:Center/HTML4/doc: Difference between revisions
< Template:Center | HTML4
Jump to navigation
Jump to search
(Corr.) |
(Highlighting.) |
||
Line 5: | Line 5: | ||
;<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== |
Revision as of 10:21, 25 January 2015
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 {{center}} 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=]]}} |
![]() |
See also
- General alignment
- {{align}}
- Specific alignment
- {{[[Template:|]]}}: uses the CSS styling attribute style="…" for alignment (HTML5 compliant).
- {{left}}
- {{right}}