Template:Center/HTML4/doc: Difference between revisions
< Template:Center | HTML4
Jump to navigation
Jump to search
(Highlighting.) |
(→Usage) |
||
Line 2: | Line 2: | ||
__NOTOC__ | __NOTOC__ | ||
==Usage== | ==Usage== | ||
{{ | {{tlf|'''center/HTML4'''}} encloses the input text or element code in {{tag|div|o}} tags and center-aligns the output block. | ||
;<big>Note</big> | ;<big>Note</big> |
Revision as of 10:22, 25 January 2015
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|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}}