asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Elements > CENTER Element

<center> Element


Causes subsequent text and images to be centered.HTML 3.2, 4, 4.01 Deprecated

HTML Syntax

NOTE: Both start and end tags are required.

Remarks

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.

Attributes

The <center> element has no attribute of its own, but supports global attributes common to all HTML elements.

Example

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
See Also

DIV



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note