HTML <center> Tag. Not Supported in HTML5.


Horizontally center text in HTML pages:

<center>This text will be center-aligned.</center>
Try it yourself »

Definition and Usage

HTML5 Not supported <center> label. Please use CSS instead.

In HTML 4.01,<center>Element obsolete

<center> Horizontally center the text it includes.

Browser Support

<center> Yes Yes Yes Yes Yes

Differences Between HTML 4.01 and HTML5

The <center> tag is not supported in HTML5.

Standard attributes

In HTML 4.01,<center> Tags support the following standard attributes:

attribute value description
class classname Specifies the class name of the element
dir rtl
Specify the text direction of the content in the element
id id Specifies the unique id of the element
lang language_code Specifies the language code of the content in the element
style style_definition Specifies the inline style of the element
title text Specify additional information for the element