Javatpoint Logo
Javatpoint Logo

HTML <center> tag (Not Supported in HTML5)

The HTML <center> is a block level element which contains both block level and inline contents within it. The content written between the <center> elements will be displayed at the middle of the page.

The <center> tag has been deprecated in HTML 4 and obsolete in HTML5.

NOTE: The <center> tag is deprecated now so instead of that you can use CSS property text-align: center; to achieve the same result.

Syntax

Following are some specifications about the <center> tag

Display Inline
Start tag/End tag Both start and End tag
Usage textual

Example

Using <center> tag

Test it Now

Using CSS

Test it Now

Output:

HTML center tag

Attribute

HTML <center> tag does not contain any specific attribute in HTML but it supports the Global Attribute (till <center> tag is not removed completely).

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<center>YesYesYesYesYes
Next TopicHTML cite Tag





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA