Template:Center/doc: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
Line 1: Line 1:
{{dochead}}{{wikipedia}}
{{dochead}}{{wikipedia}}
The <code><nowiki><center></nowiki></code> tag in {{w|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></nowiki></code> elements as a workaround: {{clear}}
The <code><nowiki><center></nowiki></code> tag in {{w|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></nowiki></code> elements as a workaround so that they do not need to be typed in every time something needs to be centered: {{clear}}


<pre><div style="text-align: center;">
<pre><div style="text-align: center;">
Line 8: Line 8:
</div></pre>
</div></pre>


This way, there is no need to manually type out the needed elements every time something needs to be centered.
{{tlx|centre|nolink}} works as well.


=== Parameters ===
=== Parameters ===