Template:Center/HTML4/doc: Difference between revisions
< Template:Center | HTML4
Jump to navigation
Jump to search
(→Usage) |
(→See also: Corr.) |
||
Line 37: | Line 37: | ||
;<big>Specific alignment</big> | ;<big>Specific alignment</big> | ||
* {{tl | * {{tl|center}}: uses the CSS styling attribute {{samp|style{{=}}"…"}} for alignment (HTML5 compliant). | ||
* {{tl|left}} | * {{tl|left}} | ||
* {{tl|right}} | * {{tl|right}} |
Revision as of 10:25, 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
- {{center}}: uses the CSS styling attribute style="…" for alignment (HTML5 compliant).
- {{left}}
- {{right}}