Tutorials References Exercises Bootcamps Videos Menu
Sign Up Create Website Get Certified Upgrade

HTML <center> Tag

Not Supported in HTML5.

The <center> tag was used in HTML4 to center-align text.

What to Use Instead?


Center-align text (with CSS):

h1 {text-align: center;}
p {text-align: center;}
div {text-align: center;}

<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<div>This is a div.</div>

Try it Yourself »