Causes subsequent text and images to be centered. | HTML 3.2, 4, 4.01 Deprecated |
HTML Syntax
<center>
...
</center>
NOTE: Both start and end tags are required.
The <center
> element lets authors easily center a block of content without having to specify the alignment of each element in the content.
It also allows centering of elements and arbitrary content that could not otherwise be centered, such as images.
The center tag is a block-level element that displays its contents centered horizontally within any of its containing elements.
NOTE: This element has been deprecated in favor of CSS stylesheets.
The <center>
element has no attribute of its own, but supports global attributes common to all HTML elements.
The following example shows how the <center
> element may be used.
<center>
<img src="sample.jpg">
<h5>Centering an Image</h5>
</center>
which would render on a Web page as follows:

Centering an Image
DIV