<center>

DeprecatedDeprecated

Centers its block-level content horizontally. Deprecated — use CSS text-align or flexbox instead.

Example

<center>Centered content</center>

About the <center> Element

The <center> HTML element belongs to the Deprecated category of HTML elements. Centers its block-level content horizontally. Deprecated — use CSS text-align or flexbox instead. Understanding when and how to use this element is essential for building well-structured, accessible, and SEO-friendly web pages.

The <center> element requires both an opening <center> and closing </center> tag. Content placed between these tags becomes the element's children. Note that this element is deprecated in HTML5 and should not be used in new projects. Modern CSS provides better alternatives.

Proper use of semantic HTML elements like <center> improves document structure, helps screen readers interpret content correctly, and provides signals to search engines about the purpose of different sections of your page. This leads to better accessibility scores, improved SEO rankings, and more maintainable code.

Related Elements