Template:Center/doc: Difference between revisions
Documentation |
mNo edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
The <code><nowiki> | The <code><<nowiki />center></code> tag in HTML is now deprecated, and there is no one-size-fits-all replacement for it. This template is designed to replicate the tag's functionality using nested <code><<nowiki />div></code> elements as a workaround so that they do not need to be typed in every time something needs to be centered: | ||
<pre><div style="text-align: center;"> | <pre><div style="text-align: center;"> | ||
| Line 12: | Line 12: | ||
; <code><nowiki>{{{1}}}</nowiki></code> (required) | ; <code><nowiki>{{{1}}}</nowiki></code> (required) | ||
: One unnamed parameter, consisting of the text to be centered. | : One unnamed parameter, consisting of the text to be centered. | ||
: {{escape notice}} | |||
; <code>width</code> (optional) | ; <code>width</code> (optional) | ||