Name
center — HTML 4.01
Synopsis
<center> . . . </center>
Centers its contents horizontally in the available width of the page or the containing element. Use of this element is strongly discouraged in favor of style sheets for centering elements.
Notes
Deprecated in HTML 4.01/XHTML. Not in HTML5.
Start/End Tags
Required/Required
Attributes
Core, Internationalization, Events
Example
<center> <h1>Introduction</h1> <p>Once upon a time . . . </p> </center>
Get HTML & XHTML Pocket Reference, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.